bfd: Add supported for LoongArch new relocations.

Define new reloc types according to linker needs.

  include/elf/
    loongarch.h

  bfd/
    bfd-in2.h
    libbfd.h
    reloc.c
    elfnn-loongarch.c
    elfxx-loongarch.c
    elfxx-loongarch.h
This commit is contained in:
liuzhensong
2022-07-11 15:11:03 +08:00
parent 5d471bd907
commit 6d13722a97
7 changed files with 2111 additions and 768 deletions

View File

@@ -6274,6 +6274,42 @@ assembler and not (currently) written to any object files. */
BFD_RELOC_LARCH_SUB24,
BFD_RELOC_LARCH_SUB32,
BFD_RELOC_LARCH_SUB64,
BFD_RELOC_LARCH_B16,
BFD_RELOC_LARCH_B21,
BFD_RELOC_LARCH_B26,
BFD_RELOC_LARCH_ABS_HI20,
BFD_RELOC_LARCH_ABS_LO12,
BFD_RELOC_LARCH_ABS64_LO20,
BFD_RELOC_LARCH_ABS64_HI12,
BFD_RELOC_LARCH_PCALA_HI20,
BFD_RELOC_LARCH_PCALA_LO12,
BFD_RELOC_LARCH_PCALA64_LO20,
BFD_RELOC_LARCH_PCALA64_HI12,
BFD_RELOC_LARCH_GOT_PC_HI20,
BFD_RELOC_LARCH_GOT_PC_LO12,
BFD_RELOC_LARCH_GOT64_PC_LO20,
BFD_RELOC_LARCH_GOT64_PC_HI12,
BFD_RELOC_LARCH_GOT_HI20,
BFD_RELOC_LARCH_GOT_LO12,
BFD_RELOC_LARCH_GOT64_LO20,
BFD_RELOC_LARCH_GOT64_HI12,
BFD_RELOC_LARCH_TLS_LE_HI20,
BFD_RELOC_LARCH_TLS_LE_LO12,
BFD_RELOC_LARCH_TLS_LE64_LO20,
BFD_RELOC_LARCH_TLS_LE64_HI12,
BFD_RELOC_LARCH_TLS_IE_PC_HI20,
BFD_RELOC_LARCH_TLS_IE_PC_LO12,
BFD_RELOC_LARCH_TLS_IE64_PC_LO20,
BFD_RELOC_LARCH_TLS_IE64_PC_HI12,
BFD_RELOC_LARCH_TLS_IE_HI20,
BFD_RELOC_LARCH_TLS_IE_LO12,
BFD_RELOC_LARCH_TLS_IE64_LO20,
BFD_RELOC_LARCH_TLS_IE64_HI12,
BFD_RELOC_LARCH_TLS_LD_PC_HI20,
BFD_RELOC_LARCH_TLS_LD_HI20,
BFD_RELOC_LARCH_TLS_GD_PC_HI20,
BFD_RELOC_LARCH_TLS_GD_HI20,
BFD_RELOC_LARCH_RELAX,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;