diff options
author | Alan Modra <amodra@gmail.com> | 2015-01-19 18:57:04 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-01-19 19:37:46 +1030 |
commit | 740bdc67c057ee8012327420848eb134e1db4211 (patch) | |
tree | 5b62be60b72fb242cfe55b497abc9894afb6218e /gas/testsuite | |
parent | 0ba38529f27a815a576bc07c85ceb65f6498ef5a (diff) | |
download | gdb-740bdc67c057ee8012327420848eb134e1db4211.zip gdb-740bdc67c057ee8012327420848eb134e1db4211.tar.gz gdb-740bdc67c057ee8012327420848eb134e1db4211.tar.bz2 |
Extend .reloc to accept some BFD_RELOCs
Tests that bfd_perform_reloc doesn't freak over a NONE reloc at end
of section.
gas/
* read.c (s_reloc): Match BFD_RELOC_NONE, BFD_RELOC{8,16,32,64}.
* write.c (get_frag_for_reloc): Allow match just past end of frag.
gas/testsuite/
* gas/all/none.s,
* gas/all/none.d: New test.
* gas/all/gas.exp: Run it.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/all/gas.exp | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/all/none.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/all/none.s | 2 |
4 files changed, 15 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 37c3e86..1feb27f 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-01-19 Alan Modra <amodra@gmail.com> + + * gas/all/none.s, + * gas/all/none.d: New test. + * gas/all/gas.exp: Run it. + 2015-01-16 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * gas/s390/esa-g5.d: Add a variant without the optional operand. diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp index 0f76bf2..67be050 100644 --- a/gas/testsuite/gas/all/gas.exp +++ b/gas/testsuite/gas/all/gas.exp @@ -430,6 +430,9 @@ gas_test_error "weakref3.s" "" "a: would close weakref loop: a => b => c => d => gas_test_error "weakref4.s" "" "is already defined" run_dump_test string +if [is_elf_format] { + run_dump_test none +} load_lib gas-dg.exp dg-init diff --git a/gas/testsuite/gas/all/none.d b/gas/testsuite/gas/all/none.d new file mode 100644 index 0000000..82e495b --- /dev/null +++ b/gas/testsuite/gas/all/none.d @@ -0,0 +1,4 @@ +#objdump: -r -w + +#... +0+ .*(NONE|NULL|UNUSED0) +\*ABS\* diff --git a/gas/testsuite/gas/all/none.s b/gas/testsuite/gas/all/none.s new file mode 100644 index 0000000..1a82f06 --- /dev/null +++ b/gas/testsuite/gas/all/none.s @@ -0,0 +1,2 @@ + .text + .reloc 0, BFD_RELOC_NONE, 0 |