diff options
author | Alan Modra <amodra@gmail.com> | 2003-02-11 03:02:46 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-02-11 03:02:46 +0000 |
commit | a48ebf4d62e8131e3a1cd7474f7a0f8c9baf666e (patch) | |
tree | 42a3e580b54346586fdc0ca32fff6cc478589c22 | |
parent | cfbd8dfaa6f3b62b0c34ff83f3d8ffed514b4f55 (diff) | |
download | fsf-binutils-gdb-a48ebf4d62e8131e3a1cd7474f7a0f8c9baf666e.zip fsf-binutils-gdb-a48ebf4d62e8131e3a1cd7474f7a0f8c9baf666e.tar.gz fsf-binutils-gdb-a48ebf4d62e8131e3a1cd7474f7a0f8c9baf666e.tar.bz2 |
* elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
.__tls_get_addr too.
(ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0741c55..42c6d2b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2003-02-11 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned + .__tls_get_addr too. + (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect. + 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp> * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 63dc8f3..7bf926f 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -3726,7 +3726,10 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) return FALSE; if (h == htab->tls_get_addr) sec->has_tls_reloc = 1; - else if (strcmp (h->root.root.string, ".__tls_get_addr") == 0) + else if ((strncmp (h->root.root.string, ".__tls_get_addr", 15) + == 0) + && (h->root.root.string[15] == 0 + || h->root.root.string[15] == '@')) { htab->tls_get_addr = h; sec->has_tls_reloc = 1; @@ -5171,6 +5174,18 @@ ppc64_elf_tls_setup (obfd, info) htab = ppc_hash_table (info); htab->tls_sec = tls; + + if (htab->tls_get_addr != NULL) + { + struct elf_link_hash_entry *h = htab->tls_get_addr; + + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + htab->tls_get_addr = h; + } + return tls != NULL; } |