aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-07-03 09:42:56 +0000
committerAlan Modra <amodra@gmail.com>2013-07-03 09:42:56 +0000
commit5295321caf668a06255f545b8deb1fe97a9357d6 (patch)
treeb2d1957afc21706e18f2e953e3e68e32ca1adef4 /bfd
parentba8ca3e7399cd074297d850b5abd16a22bdf3eb2 (diff)
downloadgdb-5295321caf668a06255f545b8deb1fe97a9357d6.zip
gdb-5295321caf668a06255f545b8deb1fe97a9357d6.tar.gz
gdb-5295321caf668a06255f545b8deb1fe97a9357d6.tar.bz2
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
when relocatable. Don't change root.type or type here. (ppc64_elf_set_toc): Set type of .TOC. to STT_OBJECT.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-ppc.c10
2 files changed, 10 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7511c6c..45604eb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2013-07-03 Alan Modra <amodra@gmail.com>
+ * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
+ when relocatable. Don't change root.type or type here.
+ (ppc64_elf_set_toc): Set type of .TOC. to STT_OBJECT.
+
+2013-07-03 Alan Modra <amodra@gmail.com>
+
* elf64-ppc.c (struct ppc_stub_hash_entry): Delete "addend".
(ppc64_elf_size_stubs): Don't set "addend".
(ppc64_elf_relocate_section): Don't allow calls via
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 21d8263..b0a9afb 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6547,12 +6547,9 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
if (htab == NULL)
return FALSE;
- if (htab->elf.hgot != NULL)
- {
- htab->elf.hgot->root.type = bfd_link_hash_new;
- htab->elf.hgot->type = STT_OBJECT;
- _bfd_elf_link_hash_hide_symbol (info, htab->elf.hgot, TRUE);
- }
+ if (!info->relocatable
+ && htab->elf.hgot != NULL)
+ _bfd_elf_link_hash_hide_symbol (info, htab->elf.hgot, TRUE);
if (htab->sfpr == NULL)
/* We don't have any relocs. */
@@ -11917,6 +11914,7 @@ ppc64_elf_set_toc (struct bfd_link_info *info, bfd *obfd)
if (htab != NULL
&& htab->elf.hgot != NULL)
{
+ htab->elf.hgot->type = STT_OBJECT;
htab->elf.hgot->root.type = bfd_link_hash_defined;
htab->elf.hgot->root.u.def.value = TOC_BASE_OFF;
htab->elf.hgot->root.u.def.section = s;