diff options
author | Alan Modra <amodra@bigpond.net.au> | 2013-07-03 09:42:56 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2013-07-03 09:42:56 +0000 |
commit | 621ab0500d11af8766750ae5d06d0ac9ddef9230 (patch) | |
tree | e594f4df3827b0da48d2bb898e84fefce207acb8 /bfd/elf64-ppc.c | |
parent | fb84d844ca4899ea4601e36e6e3d051d1f4ef43b (diff) | |
download | binutils-redhat-621ab0500d11af8766750ae5d06d0ac9ddef9230.tar.gz |
* 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/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 21d8263948..b0a9afb1a9 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; |