diff options
author | Alan Modra <amodra@gmail.com> | 2013-07-02 00:25:08 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-07-02 00:25:08 +0000 |
commit | f40da81ba51cd6e300f929ef29f14865a3e7bfcd (patch) | |
tree | 573864b8c684d5f3ff8d0021a1f583cdd823c2ff /bfd | |
parent | 9b17b5e3d77b34c501053cc47872876e4ce91326 (diff) | |
download | gdb-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')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1bbbb87..b55f3ad 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-07-02 Alan Modra <amodra@gmail.com> + + * elf64-ppc.c (ppc64_elf_relocate_section): Set "relocation" for + .TOC. after relocatable check. + 2013-07-01 Alan Modra <amodra@gmail.com> * elf64-ppc.h (ppc64_elf_toc): Delete. 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 |