aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-03-12 17:13:41 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-03-12 17:13:41 +0000
commitc4fb387b7c34ff560a22e719f4c0ca53242b2409 (patch)
treec6b30791f8208264aeed1be8c8c25e96c27a3337 /bfd/elf32-i386.c
parent53638231adc68443caa2c760416fe119708b5a78 (diff)
downloadgdb-c4fb387b7c34ff560a22e719f4c0ca53242b2409.zip
gdb-c4fb387b7c34ff560a22e719f4c0ca53242b2409.tar.gz
gdb-c4fb387b7c34ff560a22e719f4c0ca53242b2409.tar.bz2
2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
PR ld/9938 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp to check ___tls_get_addr. * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use strncmp to check __tls_get_addr.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 1cba896..3c56685 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1007,11 +1007,14 @@ elf_i386_check_tls_transition (bfd *abfd, asection *sec,
return FALSE;
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ /* Use strncmp to check ___tls_get_addr since ___tls_get_addr
+ may be versioned. */
return (h != NULL
&& h->root.root.string != NULL
&& (ELF32_R_TYPE (rel[1].r_info) == R_386_PC32
|| ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32)
- && (strcmp (h->root.root.string, "___tls_get_addr") == 0));
+ && (strncmp (h->root.root.string, "___tls_get_addr",
+ 15) == 0));
case R_386_TLS_IE:
/* Check transition from IE access model: