PR binutils/22875: i860/ELF: Report unsupported relocation types
authorMaciej W. Rozycki <macro@mips.com>
Wed, 4 Apr 2018 01:00:49 +0000 (02:00 +0100)
committerMaciej W. Rozycki <macro@mips.com>
Wed, 4 Apr 2018 01:00:49 +0000 (02:00 +0100)
commit5d7c8b80485d75242e7c78e79b3ecb4c71abaee3
tree0765f54c77f721717e32b9bfabf612c7959b8e5d
parent707bad1b21c18cf8e570fb8df8f7c5961fb0f3a5
PR binutils/22875: i860/ELF: Report unsupported relocation types

Complement commit f3185997ac09 ("PR 22875: Stop strip corrupting unknown
relocs"), <https://sourceware.org/ml/binutils/2018-02/msg00445.html>,
and also set the `bfd_error_bad_value' error and report an unsupported
relocation type if a howto lookup fails with the i860 backend, fixing a
confusing `no error' error message and removing a binutils test failure:

failed with: <.../binutils/strip-new: tmpdir/bintest.o: no error>, expected: <.* bad value>
.../binutils/strip-new: tmpdir/bintest.o: no error
FAIL: binutils-all/strip-13

with the `i860-stardent-elf' target.

bfd/
* elf32-i860.c (lookup_howto): Add `abfd' parameter.  Set the
`bfd_error_bad_value' error and call `_bfd_error_handler' on a
howto lookup failure.
(elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
accordingly.
(elf32_i860_info_to_howto_rela): Likewise.
(elf32_i860_relocate_splitn): Likewise.
(elf32_i860_relocate_pc16): Likewise.
(elf32_i860_relocate_pc26): Likewise.
(elf32_i860_relocate_section): Likewise.
bfd/ChangeLog
bfd/elf32-i860.c
This page took 0.026386 seconds and 4 git commands to generate.