This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 2.5/4 v2] GAS: Make new fake labels when cloning a symbol
"Maciej W. Rozycki" <macro@codesourcery.com> writes:
> I have given it some more thought and come to the conclusion it has to be
> decided by the caller of make_expr_symbol() whether the symbol returned
> should be equated or cloned. Assuming optimistically all the callers
> other than operand(), expr() and expr_build_dot() considered here do the
> right thing, i.e. either use make_expr_symbol() on a non-symbol or cope
> with forward references I propose to fix expr_build_dot() only, like this.
> If more places are eventually required, then a wrapper function or macro
> can be created to combine make_expr_symbol() and
> symbol_clone_if_forward_ref().
Yeah, sounds like a good plan.
> The change below fixes the problem with the two test cases mentioned
> earlier. I have regression-tested it with the arm-none-eabi and
> mips-sde-elf targets.
>
> 2010-12-03 Maciej W. Rozycki <macro@codesourcery.com>
>
> PR gas/12282
> * expr.c (expr_build_dot): Make a clone of the symbol to return if
> needed.
OK, thanks.
Richard