This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFH: Assignments folded too early


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]