forked from Imagelibrary/binutils-gdb
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.
28 lines
454 B
ArmAsm
28 lines
454 B
ArmAsm
.text
|
|
foo:
|
|
.dc.l 0x12345678
|
|
|
|
.section .rela.text
|
|
.ifdef ELF64
|
|
|
|
.dc.a 0
|
|
.dc.a 0x000ffff000000000 + RELOC
|
|
.dc.a 0x0000000000000001
|
|
|
|
.dc.a 0
|
|
.dc.a 0
|
|
.dc.a 0
|
|
.else
|
|
|
|
# Some targets, such as `h8300-*' or `ip2k-*', use 16-bit addresses.
|
|
# With them `.dc.a' emits 16-bit quantities, so we need to use
|
|
# `.dc.l' for 32-bit relocation data.
|
|
.dc.l 0
|
|
.dc.l 0x0ffff000 + RELOC
|
|
.dc.l 0x00000001
|
|
|
|
.dc.l 0
|
|
.dc.l 0
|
|
.dc.l 0
|
|
.endif
|