diff --git a/binutils/bfd/coff-rs6000.c b/binutils/bfd/coff-rs6000.c index fea5f3bc5e..983311a317 100644 --- a/binutils/bfd/coff-rs6000.c +++ b/binutils/bfd/coff-rs6000.c @@ -367,7 +367,7 @@ _bfd_xcoff_copy_private_bfd_data (bfd *ibfd, bfd *obfd) else { sec = coff_section_from_bfd_index (ibfd, ix->sntoc); - if (sec == NULL) + if (sec == NULL || sec->output_section == NULL) ox->sntoc = 0; else ox->sntoc = sec->output_section->target_index;