This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC] .fill does not accept forward labels
- From: Alan Modra <amodra at gmail dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 9 Oct 2017 09:47:19 +1030
- Subject: Re: [RFC] .fill does not accept forward labels
- Authentication-results: sourceware.org; auth=none
- References: <1219d19d-b2a3-4b22-2ae9-4d40396a0bbf@linux.vnet.ibm.com>
On Fri, Oct 06, 2017 at 01:25:28PM +0200, Andreas Krebbel wrote:
> 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?
The line in question dates to 1998
48401fcf (Tom Tromey 1998-04-22 06:10:03 +0000 1669) get_known_segmented_expression (&rep_exp);
well before gas made any attempt at multiple relaxation passes to
resolve forward references (git commit e46d99eb). So it was a quite
reasonable restriction at the time.
> 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++;
>
I think your patch is OK. Please commit.
--
Alan Modra
Australia Development Lab, IBM