diff options
author | Alan Modra <amodra@gmail.com> | 2018-03-05 14:31:05 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-03-07 16:56:31 +1030 |
commit | 0118219e1850a05ceb181a4f47a6906c01c17c83 (patch) | |
tree | 1f419c9ce14e7412990c80a91a9e10327e8a87f8 /bfd | |
parent | 1ab3e66438fdf173d245ca8e53aa412e73260960 (diff) | |
download | gdb-0118219e1850a05ceb181a4f47a6906c01c17c83.zip gdb-0118219e1850a05ceb181a4f47a6906c01c17c83.tar.gz gdb-0118219e1850a05ceb181a4f47a6906c01c17c83.tar.bz2 |
mips64 rtype_to_howto error status
* elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
(mips_elf64_slurp_one_reloc_table): Pass on error.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-mips.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6e20330..09fae15 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2018-03-07 Alan Modra <amodra@gmail.com> + + * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error. + (mips_elf64_slurp_one_reloc_table): Pass on error. + 2018-03-03 James Cowgill <james.cowgill@mips.com> Maciej W. Rozycki <macro@mips.com> diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c index ea2e921..9501613 100644 --- a/bfd/elf64-mips.c +++ b/bfd/elf64-mips.c @@ -3611,7 +3611,7 @@ mips_elf64_rtype_to_howto (bfd *abfd, unsigned int r_type, bfd_boolean rela_p) _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - r_type = R_MIPS_NONE; + return NULL; } if (rela_p) return &mips_elf64_howto_table_rela[r_type]; @@ -3800,6 +3800,8 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, relent->addend = rela.r_addend; relent->howto = mips_elf64_rtype_to_howto (abfd, type, rela_p); + if (relent->howto == NULL) + goto error_return; ++relent; } |