RFH: Assignments folded too early

Daniel Jacobowitz dan@codesourcery.com
Wed Apr 7 17:19:00 GMT 2010
On Wed, Apr 07, 2010 at 12:42:09PM -0400, Daniel Jacobowitz wrote:
> I can think of two solutions.  Keep relative symbols relative to their
> input section, or always look up the "unshadowed" version of the
> symbol when processing the RHS.  The former solution breaks for this
> version:
> 
>     begin = DEFINED(begin) ? ABSOLUTE(begin) : fallback ;
> 
> So I think it has to be the latter solution.  I'll poke around at that
> today.  It doesn't handle loops gracefully, but I can't think of
> anything that does.
> 
> Thoughts?

Interestingly, scan_for_self_assignment checks for this case and
changes how it is printed in map files to avoid the problem... but
that's the only effect it has!  That can't be right.

I have a cheesy workaround that seems to work, except that the map
files still have a bogus value that doesn't match the output file.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list