diff options
author | Alan Modra <amodra@gmail.com> | 2018-08-13 13:41:18 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-08-18 13:46:32 +0930 |
commit | 506b86a4f5fe2aff90e62940a07c9e275d406cd4 (patch) | |
tree | 8fb1c7ac2d4073b8d5ad46f07d16e2900c83a160 /libdecnumber | |
parent | 503c367dc237e6fec46d0b8ccf3e74f7406b3260 (diff) | |
download | gdb-506b86a4f5fe2aff90e62940a07c9e275d406cd4.zip gdb-506b86a4f5fe2aff90e62940a07c9e275d406cd4.tar.gz gdb-506b86a4f5fe2aff90e62940a07c9e275d406cd4.tar.bz2 |
binutils testsuite strip-13 test
The strip-13 test runs into difficulty using dc.a on some targets.
dc.a writes a power of 2 number of bytes large enough to contain a
target address. On some targets, eg. avr-elf, this can be 2 bytes but
the ELF format used require words of 4 bytes to make up a relocation
entry. There was a hack in the test, duplicating the reloc type into
what is normally the addend to make the test work when little-endian,
but that hack fails for similar big-endian targets.
This patch fixes that problem by arranging to emit 32-bit and 64-bit
ELF relocs using .4byte and .8byte directives, chosen as appropriate
for the ELF size. I've also bumped the reloc number tested to a
higher unused value, and made the number more easily parameterised by
target should that be necessary in the future. Whether REL or RELA
relocs are used is now chosen by a new is_rela readelf test of an
object file, rather than by lists of targets.
* testsuite/lib/binutils-common.exp (is_elf64): Use directory of
input file for readelf.out.
(is_rela): New proc.
* testsuite/binutils-all/objcopy.exp (elf64): Set new variable
from first result of is_elf64 test.
(reloc_format): Set using is_rela.
(strip-13): Pass RELOC and ELF64 to assembler.
(strip-14, strip-15): Use elf64 rather than calling is_elf64 again.
* testsuite/binutils-all/strip-13.d: Run for more targets.
* testsuite/binutils-all/strip-13mips64.s: Use RELOC and set
addend to zero.
* testsuite/binutils-all/strip-13rel.s: Use RELOC and ELF64.
Don't add _NONE reloc.
* testsuite/binutils-all/strip-13rela.s: Likewise.
Diffstat (limited to 'libdecnumber')
0 files changed, 0 insertions, 0 deletions