[GOLD] relaxation query

Alan Modra amodra@gmail.com
Tue Nov 27 03:27:00 GMT 2012

On Mon, Nov 26, 2012 at 02:51:54PM -0800, Doug Kwan (關振德) wrote:
> Relaxation was retrofitted into layout when I did the ARM port.
> Basically I assume that I have all the sections but I can repeatedly
> lay them out until the layout is stabilized.  You may be able to add a
> new section but you have to be very careful that the layout data
> structure is consistent and the new sections are still there if layout
> fails and relaxation rolls back the layout and retries.

So how much of that checkpointing and rollback is really needed?  What
more do you need than resetting some flags to avoid assertions?

I think it rather horrible that you took the approach of saving and
restoring everything in an Output_segment and likely the largest
vector in Output_section, input_sections_.  It means we effectively go
back to the old GNU ld way of creating all sections you might need
well before relaxation.  Either that or go to the trouble of
updating the saved state, which is messy.

Alan Modra
Australia Development Lab, IBM

More information about the Binutils mailing list