]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
LoongArch: Do not add DF_STATIC_TLS for TLS LE
authorTatsuyuki Ishi <ishitatsuyuki@gmail.com>
Thu, 28 Dec 2023 14:58:00 +0000 (23:58 +0900)
committerliuzhensong <liuzhensong@loongson.cn>
Mon, 22 Jan 2024 09:14:29 +0000 (17:14 +0800)
TLS LE is exclusively for executables, while DF_STATIC_TLS is for DLLs.
DF_STATIC_TLS should only be set for TLS IE (and when it's DLL), not LE.

bfd/elfnn-loongarch.c

index 64ccc559952a4ff44fd97df9213c620eff1e2bce..b2caa5fc3e1afc8fca7c9c1136a0d90fc7e3cc3a 100644 (file)
@@ -863,8 +863,6 @@ loongarch_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
          if (!bfd_link_executable (info))
            return false;
 
-         info->flags |= DF_STATIC_TLS;
-
          if (!loongarch_elf_record_tls_and_got_reference (abfd, info, h,
                                                           r_symndx,
                                                           GOT_TLS_LE))