This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFC] .fill does not accept forward labels
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: binutils at sourceware dot org
- Date: Fri, 6 Oct 2017 13:25:28 +0200
- Subject: [RFC] .fill does not accept forward labels
- Authentication-results: sourceware.org; auth=none
Hi,
running gas on: (x86-64)
.global _start
.text
.fill (2f-1f), 1, 0x90
1:
nop
2:
produces:
t.s: Assembler messages:
t.s:3: Warning: symbol ".L21" undefined; zero assumed
... while it works fine with backward references. Other pseudo commands like .skip work for both.
A quick hack fixes this for me without causing testsuite regressions on x86-64. However, the current
code looks intentional to me. Does anybody know what the reason is for erroring out if the symbol
isn't known yet?
diff --git a/gas/read.c b/gas/read.c
index 0b0b058..1643c5c 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2202,7 +2202,7 @@ s_fill (int ignore ATTRIBUTE_UNUSED)
md_cons_align (1);
#endif
- get_known_segmented_expression (&rep_exp);
+ expression (&rep_exp);
if (*input_line_pointer == ',')
{
input_line_pointer++;
-Andreas-