From: Renlin Li Date: Wed, 31 Oct 2018 14:38:46 +0000 (+0000) Subject: Don't create got section while processing TLS Local Exec relocations. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f32a4a593963d4c377fd59f4164c9df2cd6a7590;p=binutils-gdb.git Don't create got section while processing TLS Local Exec relocations. For Local Exec TLS model, the offset of the variable from the thread pointer can be computed at static link time. This doesn't require GOT indirection. The initial change is a bad fix for a problem during TLS GD -> LE relaxation. The proper fix is to check whether _GLOBAL_OFFSET_TABLE_ is referenced, create got section if yes. And the fix is already in the repository. bfd/ 2018-10-31 Renlin Li * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Don't create got section for Local Exec TLS model. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0959688f616..383ad4414c6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2018-10-31 Renlin Li + + * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Don't create got + section for Local Exec TLS model. + 2018-10-24 H.J. Lu PR ld/23818 diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index ee09cd74117..e2cfa86d956 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -7565,9 +7565,6 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21: - case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: - case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: - case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: { unsigned got_type; unsigned old_got_type;