Similarly for the elf mips support.
* elf32-mips.c (mips_elf_final_gp): Don't segfault on symbols
in any of the bfd_is_const_section sections.
* elf64-mips.c (mips_elf64_final_gp): Likewise.
* elfn32-mips.c (mips_elf_final_gp): Likewise.
mips_elf_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable,
char **error_message, bfd_vma *pgp)
{
- if (bfd_is_und_section (symbol->section)
- && ! relocatable)
+ if (output_bfd == NULL)
{
*pgp = 0;
return bfd_reloc_undefined;
mips_elf64_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable,
char **error_message, bfd_vma *pgp)
{
- if (bfd_is_und_section (symbol->section)
- && ! relocatable)
+ if (output_bfd == NULL)
{
*pgp = 0;
return bfd_reloc_undefined;
mips_elf_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable,
char **error_message, bfd_vma *pgp)
{
- if (bfd_is_und_section (symbol->section)
- && ! relocatable)
+ if (output_bfd == NULL)
{
*pgp = 0;
return bfd_reloc_undefined;