From 04621f8a013a7ed06d34b9ff2aea66d6bb6b5055 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Tue, 1 Sep 2015 00:06:10 +0200 Subject: [PATCH] work around a crash in powerpc-apple-ld --- binutils/bfd/coff-rs6000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;