sec->output_section will be NULL when objcopy removes sections.
* coff-rs6000.c (_bfd_xcoff_copy_private_bfd_data): Protect against
objcopy removing sections.
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;
else
{
sec = coff_section_from_bfd_index (ibfd, ix->snentry);
- if (sec == NULL)
+ if (sec == NULL || sec->output_section == NULL)
ox->snentry = 0;
else
ox->snentry = sec->output_section->target_index;