This is the mail archive of the
mailing list for the binutils project.
Re: RFH: Assignments folded too early
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Wed, 7 Apr 2010 13:19:19 -0400
- Subject: Re: RFH: Assignments folded too early
- References: <20100407164206.GA6029@caradoc.them.org>
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
> 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.
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.