diff options
author | Alan Modra <amodra@gmail.com> | 2022-06-03 13:12:01 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-06-03 13:12:01 +0930 |
commit | 6b8b24bb688e53e251bbe2f3f9ddc44bca122bde (patch) | |
tree | 4378d4a258584e6a399dadab81fffec0769fa81b /bfd/elfn32-mips.c | |
parent | 679dc6e71647adf2719c411de5006358d27978b7 (diff) | |
download | gdb-6b8b24bb688e53e251bbe2f3f9ddc44bca122bde.zip gdb-6b8b24bb688e53e251bbe2f3f9ddc44bca122bde.tar.gz gdb-6b8b24bb688e53e251bbe2f3f9ddc44bca122bde.tar.bz2 |
Re: asan: mips_gprel_reloc segfault
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.
Diffstat (limited to 'bfd/elfn32-mips.c')
-rw-r--r-- | bfd/elfn32-mips.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index 1ae51a4..07b753f 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -3254,8 +3254,7 @@ static bfd_reloc_status_type 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; |