[PATCH 1/5] gas: streamline expr_build_dot()

Maciej W. Rozycki macro@orcam.me.uk
Tue Nov 26 02:43:44 GMT 2024


On Fri, 22 Nov 2024, Jan Beulich wrote:

> There's no point involving symbol_clone_if_forward_ref(), just for it to
> replace dot_symbol by one obtained from symbol_temp_new_now(). For the
> abs-section case also produce a slightly more "complete" (as in: all
> potentially relevant fields filled) expression by going through
> expr_build_uconstant().

 As I recall this cloning is needed for equated symbols, so that the value 
of `.' used in an expression used for a symbol's calculation is obtained 
at the time of the symbol's reference and not the symbol's definition.

 For further details please see the discussion starting from: 
<https://inbox.sourceware.org/binutils/alpine.DEB.1.10.1010291442440.25860@tp.orcam.me.uk/>.

 Let me know if you have further questions after reviewing it and I'll try 
to address them (mind though that it's been 14 years since I worked on it 
and my memory may a bit hazy about it now).

  Maciej


More information about the Binutils mailing list