Like commit
804439b4d7a8, avoid segfaults when the hack to access
the output bfd won't work, eg. when the sym is absolute.
* elf32-score.c (score_elf_gprel15_reloc): Return bfd_reloc_undefined
when output_bfd cannot be determined from the symbol.
(score_elf_gprel32_reloc): Likewise.
* elf32-score7.c (score_elf_gprel32_reloc): Likewise.
{
relocateable = false;
output_bfd = symbol->section->output_section->owner;
+ if (output_bfd == NULL)
+ return bfd_reloc_undefined;
}
ret = score_elf_final_gp (output_bfd, symbol, relocateable, error_message, &gp);
{
relocatable = false;
output_bfd = symbol->section->output_section->owner;
+ if (output_bfd == NULL)
+ return bfd_reloc_undefined;
}
ret = score_elf_final_gp (output_bfd, symbol, relocatable, error_message, &gp);
{
relocatable = false;
output_bfd = symbol->section->output_section->owner;
+ if (output_bfd == NULL)
+ return bfd_reloc_undefined;
}
ret = score_elf_final_gp (output_bfd, symbol, relocatable, error_message, &gp);