LoongArch: Add support for TLSDESC in ld.
authorLulu Cai <cailulu@loongson.cn>
Tue, 31 Oct 2023 08:11:56 +0000 (16:11 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Mon, 25 Dec 2023 03:46:22 +0000 (11:46 +0800)
commit4f248d61eb9d319b552e3e0b2db862928c2c1971
tree6dbce4c0c15073cdf91151bb318efa0ab69bac13
parent26265e7fdf19d461563388495b6799eb3719f80a
LoongArch: Add support for TLSDESC in ld.

1.The linker for each DESC generates a R_LARCH_TLS_DESC64 dynamic
  relocation, which relocation is placed at .rela.dyn.
  TLSDESC always allocates two GOT slots and one dynamic relocation
  space to TLSDESC.
2. When using multiple ways to access the same TLS variable, a
   maximum of 5 GOT slots are used. For example, using GD, TLSDESC,
   and IE to access the same TLS variable, GD always uses the first
   two of the five GOT, TLSDESC uses the third and fourth, and IE
   uses the last.
bfd/elfnn-loongarch.c