Index: bfd/elf32-ppc.c =================================================================== --- bfd/elf32-ppc.c (revision 184409) +++ bfd/elf32-ppc.c (working copy) @@ -6527,7 +6527,8 @@ ppc_elf_relocate_section (bfd *output_bf an embedded ELF object, for which the .got section acts like the AIX .toc section. */ case R_PPC_TOC16: /* phony GOT16 relocations */ - BFD_ASSERT (sec != NULL); + if (sec == NULL) + continue; BFD_ASSERT (bfd_is_und_section (sec) || strcmp (bfd_get_section_name (abfd, sec), ".got") == 0 || strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0); @@ -6569,7 +6570,8 @@ ppc_elf_relocate_section (bfd *output_bf const char *name; struct elf_link_hash_entry *sh; - BFD_ASSERT (sec != NULL); + if (sec == NULL) + continue; name = bfd_get_section_name (abfd, sec->output_section); if (! ((CONST_STRNEQ (name, ".sdata") && (name[6] == 0 || name[6] == '.')) @@ -6606,7 +6608,8 @@ ppc_elf_relocate_section (bfd *output_bf const char *name; struct elf_link_hash_entry *sh; - BFD_ASSERT (sec != NULL); + if (sec == NULL) + continue; name = bfd_get_section_name (abfd, sec->output_section); if (! (CONST_STRNEQ (name, ".sdata2") || CONST_STRNEQ (name, ".sbss2"))) @@ -6647,7 +6650,8 @@ ppc_elf_relocate_section (bfd *output_bf int reg; struct elf_link_hash_entry *sh; - BFD_ASSERT (sec != NULL); + if (sec == NULL) + continue; name = bfd_get_section_name (abfd, sec->output_section); if (((CONST_STRNEQ (name, ".sdata") && (name[6] == 0 || name[6] == '.')) @@ -6724,7 +6728,8 @@ ppc_elf_relocate_section (bfd *output_bf case R_PPC_SECTOFF_LO: case R_PPC_SECTOFF_HI: case R_PPC_SECTOFF_HA: - BFD_ASSERT (sec != NULL); + if (sec == NULL) + continue; addend -= sec->output_section->vma; break;