summaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2013-02-07 02:15:28 +0000
committerH.J. Lu <hjl.tools@gmail.com>2013-02-07 02:15:28 +0000
commit6396600033c665c7c493142b490bd13ae3fc1ded (patch)
tree05a0d7be27092440f81d725ec35f5af981c069d3 /bfd/elf32-i386.c
parent180ca03b42ba20ef4969e7ecb4c5056e56ad489a (diff)
downloadbinutils-redhat-6396600033c665c7c493142b490bd13ae3fc1ded.tar.gz
Don't resolve size relocation against non-zero TLS symbol
bfd/ * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count for non-zero TLS symbol. (elf_i386_relocate_section): Don't resolve size relocation against non-zero TLS symbol. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear pc_count for non-zero TLS symbol. (elf_x86_64_relocate_section): Don't resolve size relocation against non-zero TLS symbol. ld/testsuite/ * ld-size/size-10.rd: Updated. * ld-size/size-8.rd: Likewise. * ld-size/size32-2-i386.d: Likewise. * ld-size/size32-2-x32.d: Likewise. * ld-size/size32-2-x86-64.d: Likewise. * ld-size/size64-2-x32.d: Likewise. * ld-size/size64-2-x86-64.d: Likewise. * ld-size/size.exp (run_time_tests): Pass --hash-styl=gnu to linker for size-8 test.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 01e50a41c6..f8ad1d1c1f 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -2358,24 +2358,6 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (eh->dyn_relocs == NULL)
return TRUE;
- /* Since pc_count for TLS symbol can only have size relocations and
- we always resolve size relocation against non-zero TLS symbol, we
- clear pc_count for non-zero TLS symbol. */
- if (h->type == STT_TLS && h->size != 0)
- {
- struct elf_dyn_relocs **pp;
-
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
- {
- p->count -= p->pc_count;
- p->pc_count = 0;
- if (p->count == 0)
- *pp = p->next;
- else
- pp = &p->next;
- }
- }
-
/* In the shared -Bsymbolic case, discard space allocated for
dynamic pc-relative relocs against symbols which turn out to be
defined in regular objects. For the normal shared case, discard
@@ -3709,12 +3691,6 @@ elf_i386_relocate_section (bfd *output_bfd,
case R_386_SIZE32:
/* Set to symbol size. */
relocation = st_size;
- if (h && h->type == STT_TLS && st_size != 0)
- {
- /* Resolve size relocation against non-zero TLS symbol. */
- unresolved_reloc = FALSE;
- break;
- }
/* Fall through. */
case R_386_32: