+2012-06-26 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
+ file has multiple .got/.toc sections and all don't fit in
+ current toc group.
+
2012-06-22 Roland McGrath <mcgrathr@google.com>
* elf.c (assign_file_positions_for_non_load_sections): Define
if (!htab->second_toc_pass)
{
/* Keep track of the first .toc or .got section for this input bfd. */
- if (htab->toc_bfd != isec->owner)
+ bfd_boolean new_bfd = htab->toc_bfd != isec->owner;
+
+ if (new_bfd)
{
htab->toc_bfd = isec->owner;
htab->toc_first_sec = isec;
/* Die if someone uses a linker script that doesn't keep input
file .toc and .got together. */
- if (elf_gp (isec->owner) != 0
+ if (new_bfd
+ && elf_gp (isec->owner) != 0
&& elf_gp (isec->owner) != off)
return FALSE;