[PATCH 5/6] PR binutils/22875: i860/ELF: Report unsupported relocation types

Alan Modra amodra@gmail.com
Fri Mar 30 12:53:00 GMT 2018


On Thu, Mar 29, 2018 at 06:34:31PM +0100, Maciej W. Rozycki wrote:
> 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.

OK, and thanks for writing this patch series.

Huh, I see i860-* has been obsolete since 2016-09-27.  So we have been
a little slow to carry out the "Support will be REMOVED in the next
major release of BINUTILS" threat.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list