diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elfxx-x86.c | 11 |
2 files changed, 16 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 13c2ea6..3d07aac 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2018-01-20 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/22721 + * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the + versioned __tls_get_addr symbol. + 2018-01-19 Nick Clifton <nickc@redhat.com> * po/fr.po: Updated French translation. diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index a9ee4ba..a7db5d9 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -856,7 +856,16 @@ _bfd_x86_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) htab->tls_get_addr, FALSE, FALSE, FALSE); if (h != NULL) - elf_x86_hash_entry (h)->tls_get_addr = 1; + { + elf_x86_hash_entry (h)->tls_get_addr = 1; + + /* Check the versioned __tls_get_addr symbol. */ + while (h->root.type == bfd_link_hash_indirect) + { + h = (struct elf_link_hash_entry *) h->root.u.i.link; + elf_x86_hash_entry (h)->tls_get_addr = 1; + } + } /* "__ehdr_start" will be defined by linker as a hidden symbol later if it is referenced and not defined. */ |