work around a crash in powerpc-apple-ld

This commit is contained in:
Wolfgang Thaller 2015-09-01 00:06:10 +02:00
parent 899546720e
commit 04621f8a01

View File

@ -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;