This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC] .fill does not accept forward labels
On 10/09/2017 12:58 PM, H.J. Lu wrote:
...
> Please use "objdump" to verify that contents are filled properly.
Like this?
Add objdump check to fill-1 testcase
gas/ChangeLog:
2017-10-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR gas/22272
* testsuite/gas/all/fill-1.d: New objdump test.
* testsuite/gas/all/fill-1.s: Change output patterns.
* testsuite/gas/all/gas.exp: Use run_dump_test to run fill-1.
diff --git a/gas/testsuite/gas/all/fill-1.d b/gas/testsuite/gas/all/fill-1.d
new file mode 100644
index 0000000..80b8d0a
--- /dev/null
+++ b/gas/testsuite/gas/all/fill-1.d
@@ -0,0 +1,7 @@
+#objdump: -s
+#name: fill test with forward labels
+
+.*: +file format .*
+
+Contents of section .data:
+ [^ ]* (0a0a0d0d 0b0b0c0c) .*
diff --git a/gas/testsuite/gas/all/fill-1.s b/gas/testsuite/gas/all/fill-1.s
index e72cbf1..3d27e51 100644
--- a/gas/testsuite/gas/all/fill-1.s
+++ b/gas/testsuite/gas/all/fill-1.s
@@ -1,5 +1,7 @@
- .text
- .fill (2f-1f), 1, 0x90
+ .data
+ .word 0x0a0a
+ .fill (2f-1f), 1, 0x0d
1:
- .word 42
+ .word 0x0b0b
2:
+ .word 0x0c0c
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index 93e31da..1810ef4 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -487,4 +487,4 @@ run_dump_test "org-4"
run_dump_test "org-5"
run_dump_test "org-6"
-gas_test "fill-1.s" "" "" "test .fill forward label references"
+run_dump_test "fill-1"