diff options
author | Lulu Cai <cailulu@loongson.cn> | 2023-10-31 16:11:29 +0800 |
---|---|---|
committer | liuzhensong <liuzhensong@loongson.cn> | 2023-12-25 11:46:22 +0800 |
commit | 26265e7fdf19d461563388495b6799eb3719f80a (patch) | |
tree | 3aaf2793a448b90fd5d55097ee5dbf9efa12ad4c /bfd/bfd-in2.h | |
parent | 051b3736af7b9dc47a37e31a9c82556e942d1ed4 (diff) | |
download | gdb-26265e7fdf19d461563388495b6799eb3719f80a.zip gdb-26265e7fdf19d461563388495b6799eb3719f80a.tar.gz gdb-26265e7fdf19d461563388495b6799eb3719f80a.tar.bz2 |
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
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 53c40ec..85251aa 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -7377,6 +7377,8 @@ enum bfd_reloc_code_real BFD_RELOC_LARCH_TLS_DTPREL64, BFD_RELOC_LARCH_TLS_TPREL32, BFD_RELOC_LARCH_TLS_TPREL64, + BFD_RELOC_LARCH_TLS_DESC32, + BFD_RELOC_LARCH_TLS_DESC64, BFD_RELOC_LARCH_MARK_LA, BFD_RELOC_LARCH_MARK_PCREL, BFD_RELOC_LARCH_SOP_PUSH_PCREL, @@ -7461,6 +7463,16 @@ enum bfd_reloc_code_real BFD_RELOC_LARCH_SUB_ULEB128, BFD_RELOC_LARCH_64_PCREL, BFD_RELOC_LARCH_CALL36, + BFD_RELOC_LARCH_TLS_DESC_PC_HI20, + BFD_RELOC_LARCH_TLS_DESC_PC_LO12, + BFD_RELOC_LARCH_TLS_DESC64_PC_LO20, + BFD_RELOC_LARCH_TLS_DESC64_PC_HI12, + BFD_RELOC_LARCH_TLS_DESC_HI20, + BFD_RELOC_LARCH_TLS_DESC_LO12, + BFD_RELOC_LARCH_TLS_DESC64_LO20, + BFD_RELOC_LARCH_TLS_DESC64_HI12, + BFD_RELOC_LARCH_TLS_DESC_LD, + BFD_RELOC_LARCH_TLS_DESC_CALL, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; |