This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] .fill does not accept forward labels


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-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]