aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-07-02 00:25:08 +0000
committerAlan Modra <amodra@gmail.com>2013-07-02 00:25:08 +0000
commitf40da81ba51cd6e300f929ef29f14865a3e7bfcd (patch)
tree573864b8c684d5f3ff8d0021a1f583cdd823c2ff /bfd/elf64-ppc.c
parent9b17b5e3d77b34c501053cc47872876e4ce91326 (diff)
downloadgdb-f40da81ba51cd6e300f929ef29f14865a3e7bfcd.zip
gdb-f40da81ba51cd6e300f929ef29f14865a3e7bfcd.tar.gz
gdb-f40da81ba51cd6e300f929ef29f14865a3e7bfcd.tar.bz2
bfd/
* elf64-ppc.c (ppc64_elf_relocate_section): Set "relocation" for .TOC. after relocatable check. gas/ * config/tc-ppc.c (ppc_elf_adjust_symtab): Don't make .TOC. weak.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index fb808d6..7829520 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -12467,13 +12467,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
}
}
- if (h_elf == htab->elf.hgot)
- {
- relocation = (TOCstart
- + htab->stub_group[input_section->id].toc_off);
- sec = bfd_abs_section_ptr;
- unresolved_reloc = FALSE;
- }
}
h = (struct ppc_link_hash_entry *) h_elf;
@@ -12486,6 +12479,14 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (info->relocatable)
continue;
+ if (h != NULL && &h->elf == htab->elf.hgot)
+ {
+ relocation = (TOCstart
+ + htab->stub_group[input_section->id].toc_off);
+ sec = bfd_abs_section_ptr;
+ unresolved_reloc = FALSE;
+ }
+
/* TLS optimizations. Replace instruction sequences and relocs
based on information we collected in tls_optimize. We edit
RELOCS so that --emit-relocs will output something sensible