LoongArch: Add new relocs and macro for TLSDESC.
authorLulu Cai <cailulu@loongson.cn>
Tue, 31 Oct 2023 08:11:29 +0000 (16:11 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Mon, 25 Dec 2023 03:46:22 +0000 (11:46 +0800)
commit26265e7fdf19d461563388495b6799eb3719f80a
tree3aaf2793a448b90fd5d55097ee5dbf9efa12ad4c
parent051b3736af7b9dc47a37e31a9c82556e942d1ed4
LoongArch: Add new relocs and macro for TLSDESC.

The normal DESC instruction sequence is:
  pcalau12i  $a0,%desc_pc_hi20(var)     #R_LARCH_TLS_DESC_PC_HI20
  addi.d     $a0,$a0,%desc_pc_lo12(var) #R_LARCH_TLS_DESC_PC_LO12
  ld.d       $ra,$a0,%desc_ld(var) #R_LARCH_TLS_DESC_LD
  jirl       $ra,$ra,%desc_call(var) #R_LARCH_TLS_DESC_CALL
  add.d      $a0,$a0,$tp
bfd/bfd-in2.h
bfd/elfxx-loongarch.c
bfd/libbfd.h
bfd/reloc.c
gas/config/tc-loongarch.c
include/elf/loongarch.h
opcodes/loongarch-opc.c