+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.
+
2009-03-12 Andrew Stubbs <ams@codesourcery.com>
* dwarf2.c (read_section): Always check the offset, even when the
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:
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
&& (ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PC32
|| ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PLT32)
- && (strcmp (h->root.root.string, "__tls_get_addr") == 0));
+ && (strncmp (h->root.root.string,
+ "__tls_get_addr", 14) == 0));
case R_X86_64_GOTTPOFF:
/* Check transition from IE access model: