diff options
author | Nick Clifton <nickc@redhat.com> | 2018-07-13 15:48:49 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-07-13 15:48:49 +0100 |
commit | b84f59efc6d6d8e97135a1b92ca224d1b2cffe16 (patch) | |
tree | c4d4f7d12767b1757fcafd32d306c4c3157fde7f /gas/testsuite | |
parent | 4ef4710f5c3e417dc43057e10d7675699bb38431 (diff) | |
download | gdb-b84f59efc6d6d8e97135a1b92ca224d1b2cffe16.zip gdb-b84f59efc6d6d8e97135a1b92ca224d1b2cffe16.tar.gz gdb-b84f59efc6d6d8e97135a1b92ca224d1b2cffe16.tar.bz2 |
Add a test that relocs are correctly generated for missing build notes.
* testsuite/gas/elf/missing-build-notes.s: New test. Checks that
relocs are correctly generated for missing build notes.
* testsuite/gas/elf/missing-build-notes.d: New file. Expected
output from objdump.
* testsuite/gas/elf/elf.exp: Run the new test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/elf/elf.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/missing-build-notes.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/missing-build-notes.s | 6 |
3 files changed, 22 insertions, 0 deletions
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index bb10ac6..a7c793b 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -244,6 +244,8 @@ if { [is_elf_format] } then { run_dump_test "bad-group" run_dump_test "syms" + + run_dump_test "missing-build-notes" # hpux has a non-standard common directive. if { ![istarget "*-*-hpux*"] } then { diff --git a/gas/testsuite/gas/elf/missing-build-notes.d b/gas/testsuite/gas/elf/missing-build-notes.d new file mode 100644 index 0000000..1d3efbb --- /dev/null +++ b/gas/testsuite/gas/elf/missing-build-notes.d @@ -0,0 +1,14 @@ +# as: --generate-missing-build-notes=yes +# objdump: -r +#skip: mips*-*-openbsd + +# Check that the relocations are for increasing addresses... + +#... +RELOCATION RECORDS FOR \[.gnu.build.attributes\]: +OFFSET[ ]+TYPE[ ]+VALUE +0+014 .*[ ]+.* +0+0(18|1c) .*[ ]+.* +0+0(30|38) .*[ ]+.* +0+0(34|40) .*[ ]+.* +#pass diff --git a/gas/testsuite/gas/elf/missing-build-notes.s b/gas/testsuite/gas/elf/missing-build-notes.s new file mode 100644 index 0000000..72797cd --- /dev/null +++ b/gas/testsuite/gas/elf/missing-build-notes.s @@ -0,0 +1,6 @@ + .text + .dc.l 1 + + .section .text.unused,"ax" + .dc.l 2 + |