RISC-V: test for expected / no unexpected symbols
[binutils-gdb.git] / bfd / elfxx-loongarch.h
blob1a6b6df18f8457b75dd2ecec2f4255bb9fec6032
1 /* LoongArch-specific backend routines.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
3 Contributed by Loongson Ltd.
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING3. If not,
19 see <http://www.gnu.org/licenses/>. */
21 #include "elf/common.h"
22 #include "elf/internal.h"
24 extern reloc_howto_type *
25 loongarch_elf_rtype_to_howto (bfd *abfd, unsigned int r_type);
27 extern reloc_howto_type *
28 loongarch_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code);
30 extern reloc_howto_type *
31 loongarch_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name);
33 extern bfd_reloc_code_real_type
34 loongarch_larch_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
35 const char *l_r_name);
37 bool loongarch_adjust_reloc_bitsfield (reloc_howto_type *howto, bfd_vma *fix_val);
39 /* TRUE if this is a PLT reference to a local IFUNC. */
40 #define PLT_LOCAL_IFUNC_P(INFO, H) \
41 ((H)->dynindx == -1 \
42 || ((bfd_link_executable (INFO) \
43 || ELF_ST_VISIBILITY ((H)->other) != STV_DEFAULT) \
44 && (H)->def_regular \
45 && (H)->type == STT_GNU_IFUNC))