binutils/testsuite: Verify the handling of invalid `r_sym' in relocation
authorMaciej W. Rozycki <macro@mips.com>
Mon, 9 Apr 2018 12:42:00 +0000 (13:42 +0100)
committerMaciej W. Rozycki <macro@mips.com>
Mon, 9 Apr 2018 12:42:00 +0000 (13:42 +0100)
commit3f97ba9fc82dbb1bca72fd8a137b2de132348367
tree103114a16d83aec1c5af01d633382ef1422e1bc9
parent9ccfa98b4cbc86ac34734ecf9d35466461c7e34c
binutils/testsuite: Verify the handling of invalid `r_sym' in relocation

Verify that `strip' terminates gracefully and a correct error message is
produced for a relocation encountered with an invalid symbol index.  No
single relocation number is valid across all targets we support, so pick
a few numbers to choose from depending on the target.

binutils/
* testsuite/binutils-all/strip-14.d: New test.
* testsuite/binutils-all/strip-14rel.s: New test source.
* testsuite/binutils-all/strip-14rela.s: New test source.
* testsuite/binutils-all/strip-14mips64.s: New test source.
* testsuite/binutils-all/objcopy.exp: Run the new test.
binutils/ChangeLog
binutils/testsuite/binutils-all/objcopy.exp
binutils/testsuite/binutils-all/strip-14.d [new file with mode: 0644]
binutils/testsuite/binutils-all/strip-14mips64.s [new file with mode: 0644]
binutils/testsuite/binutils-all/strip-14rel.s [new file with mode: 0644]
binutils/testsuite/binutils-all/strip-14rela.s [new file with mode: 0644]