diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2023-09-25 10:55:51 +0300 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gmail.com> | 2023-09-25 10:55:51 +0300 |
commit | 06e8d9861d16c5b7e6920ad0e89889ccf45c575a (patch) | |
tree | 86a19fa0a0cbead51ad1207536763fa854732d40 /bfd/bfd-in2.h | |
parent | 6e467e9a94c1135bd11d985e9263d43204a9258b (diff) | |
download | fsf-binutils-gdb-06e8d9861d16c5b7e6920ad0e89889ccf45c575a.zip fsf-binutils-gdb-06e8d9861d16c5b7e6920ad0e89889ccf45c575a.tar.gz fsf-binutils-gdb-06e8d9861d16c5b7e6920ad0e89889ccf45c575a.tar.bz2 |
arc: Add new ARCv3 ISA to BFD.
The new Synopsys's ARCv3 ISA is capable to run either 64-bit or
32-bit ISA. The new 32-bit ISA is not compatible with the old
Synopsys ARCv1/ARCv2 ISA, however, it retains a lot of common
concepts. Thus, this patch is reusing the old ARC BFD backend and
adds the necessary bits for the new architecture in a similar way as
it is done for RISCV backend.
bfd/
xxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com>
Cupertino Miranda <cupertinomiranda@gmail.com>
* bfd/Makefile.am: Add ARC64 files.
* bfd/Makefile.in: Regerate.
* bfd/arc-got.h (TCB_SIZE): Depends on the target architecture.
(GOT_ENTRY_SIZE): New define.
(write_in_got): Likewise.
(read_from_got): Likewise.
(align_power): Likewise.
(arc_got_entry_type_for_reloc): Use RELA_SIZE and GOT_ENTRY_SIZE.
(arc_fill_got_info_for_reloc): Update formating.
(relocate_fix_got_relocs_for_got_info): Likewise.
(arc_static_sym_data): Deleted structure.
(get_static_sym_data): Deleted function.
(relocate_fix_got_relocs_for_got_info): Use symbol static data.
(create_got_dynrelocs_for_single_entry): Update formating.
(create_got_dynrelocs_for_got_info): Likewise.
* bfd/arc-plt.c: New file.
* bfd/arc-plt.def: Add ARC64 PLT entry.
* bfd/arc-plt.h: Clean it up, move functionality to arc-plt.c file.
* bfd/archures.c: Add ARC64 target.
* bfd/config.bfd: Likewise.
* bfd/configure.ac: Likewise.
* bfd/bfd-in2.h: Regenerate.
* bfd/configure: Likewise.
* bfd/libbfd.h: Likewise.
* bfd/cpu-arc.c: Clean it up.
* bfd/cpu-arc64.c: New file.
* bfd/elf32-arc.c: Renamed to elfnn-arc.c.
* bfd/elfnn-arc.c: New file.
* bfd/reloc.c: Add new ARC64 relocs.
* bfd/targets.c: Add ARC64 target.
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 1c4f75a..991344a 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1617,6 +1617,9 @@ enum bfd_architecture #define bfd_mach_arc_arc601 4 #define bfd_mach_arc_arc700 3 #define bfd_mach_arc_arcv2 5 + bfd_arch_arc64, /* ARCv3 32/64 Cores. */ +#define bfd_mach_arcv3_64 1 +#define bfd_mach_arcv3_32 2 bfd_arch_m32c, /* Renesas M16C/M32C. */ #define bfd_mach_m16c 0x75 #define bfd_mach_m32c 0x78 @@ -4383,6 +4386,7 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARC_16, BFD_RELOC_ARC_24, BFD_RELOC_ARC_32, + BFD_RELOC_ARC_64, BFD_RELOC_ARC_N8, BFD_RELOC_ARC_N16, BFD_RELOC_ARC_N24, @@ -4447,6 +4451,27 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARC_S21H_PCREL_PLT, BFD_RELOC_ARC_NPS_CMEM16, BFD_RELOC_ARC_JLI_SECTOFF, + BFD_RELOC_ARC_S7H_PCREL, + BFD_RELOC_ARC_S8H_PCREL, + BFD_RELOC_ARC_S9H_PCREL, + BFD_RELOC_ARC_S10H_PCREL, + BFD_RELOC_ARC_S13H_PCREL, + BFD_RELOC_ARC_ALIGN, + BFD_RELOC_ARC_ADD8, + BFD_RELOC_ARC_ADD16, + BFD_RELOC_ARC_SUB8, + BFD_RELOC_ARC_SUB16, + BFD_RELOC_ARC_SUB32, + BFD_RELOC_ARC_LO32, + BFD_RELOC_ARC_HI32, + BFD_RELOC_ARC_LO32_ME, + BFD_RELOC_ARC_HI32_ME, + BFD_RELOC_ARC_N64, + BFD_RELOC_ARC_SDA_LDST3, + BFD_RELOC_ARC_NLO32, + BFD_RELOC_ARC_NLO32_ME, + BFD_RELOC_ARC_PCLO32_ME_2, + BFD_RELOC_ARC_PLT34, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, |