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.
This commit is contained in:
parent
53638231ad
commit
c4fb387b7c
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -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:
|
||||
|
@ -810,11 +810,14 @@ elf64_x86_64_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
|
||||
&& (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:
|
||||
|
Loading…
Reference in New Issue
Block a user