Commit: PR 22875: Stop strip corrupting unknown relocs

Maciej W. Rozycki
Sat Mar 3 17:34:00 GMT 2018

Hi Nick,

>   The patch is quite large, because it touches almost all of the ELF
>   files in the BFD library, but it is actually quite simple in
>   execution.  I have tested it with a large number of different targets,
>   and added a small testcase to the binutils testsuite as well.

 Nevertheless it has caused failures with the new test case and the 
`mips64-openbsd' and `mips64el-openbsd' targets:

Executing on host: .../binutils/strip-new  -g tmpdir/bintest.o -o tmpdir/copy.o   (timeout = 300)
.../binutils/strip-new: tmpdir/bintest.o: unsupported relocation type 0xf1
.../binutils/strip-new: tmpdir/bintest.o: unsupported relocation type 0xf1

failed with: <.../binutils/strip-new: tmpdir/bintest.o: unsupported relocation type 0xf1>, expected: <.* bad value>
.../binutils/strip-new: tmpdir/bintest.o: unsupported relocation type 0xf1
FAIL: binutils-all/strip-13

which both default to the n64 rather than o32 or n32 MIPS ABI.

 Offhand the error message appears correct to me, and arguably more useful 
than ambiguous and rather cryptic "bad value".  However I find it strange 
that the MIPS n64 ABI backend is the only one to give this different error 
message, despite that backends for the three MIPS ABIs are all structured 

 I'll be away the coming fortnight so please have a look into it if you 
wish so and otherwise I will once I am back.


More information about the Binutils mailing list