+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".
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. */
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;