gas simple-forward test

Tests that target md_apply_fix can handle fixups that have resolved
down to a constant and thus do not need relocations.

Also a fix for eqv-dot xfails.

	* testsuite/gas/all/simple-forward.d,
	* testsuite/gas/all/simple-forward.s: New test.
	* testsuite/gas/all/gas.exp: Run it.
	* testsuite/gas/all/eqv-dot.d: xfail tic30 and tic54x.
This commit is contained in:
Alan Modra 2018-10-22 13:49:21 +10:30
parent e1748c54a2
commit 1f38083f42
5 changed files with 36 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2018-10-22 Alan Modra <amodra@gmail.com>
* testsuite/gas/all/simple-forward.d,
* testsuite/gas/all/simple-forward.s: New test.
* testsuite/gas/all/gas.exp: Run it.
* testsuite/gas/all/eqv-dot.d: xfail tic30 and tic54x.
2018-10-22 Alan Modra <amodra@gmail.com>
* config/tc-alpha.c (md_apply_fix): Handle BFD_RELOC_8 for fixups

View File

@ -1,8 +1,8 @@
#objdump: -s -j .data
#name: eqv involving dot
# bfin doesn't support 'symbol = expression'
# tic4x has 4 octets per byte
#notarget: bfin-*-* tic4x-*-*
# tic30 and tic4x have 4 octets per byte, tic54x has 2 octets per byte
#notarget: bfin-*-* *c30-*-* *c4x-*-* *c54x-*-*
.*: .*

View File

@ -98,6 +98,8 @@ if { ![istarget "bfin-*-*"] } then {
}
gas_test_error "assign-bad.s" "" "== assignment for symbol already set"
run_dump_test simple-forward
# .equ works differently on some targets.
# linkrelax-ing prevents most forward references from working.
case $target_triplet in {

View File

@ -0,0 +1,14 @@
#objdump: -s -j .data
#name: simple forward references
# tic30 and tic4x have 4 octets per byte, tic54x has 2 octets per byte
#notarget: *c30-*-* *c4x-*-* *c54x-*-*
# am33, crx and mn10300 all emit relocs unnecessarily for this test,
# but the code they generate is correct. Others emit incorrect relocs
# which lead to incorrect results after linking.
#xfail: am33*-*-* crx-*-* mn10300-*-*
.*: .*
Contents of section \.data:
0000 0c000000 (0c000000 0c000000|000c0000 0000000c) .*
#pass

View File

@ -0,0 +1,11 @@
.data
.balign 4
L0:
.balign 4
.dc.b L1-L0
.balign 4
.dc.w L1-L0
.balign 4
.dc.l L1-L0
.balign 4
L1: