gold patch committed: Update order if section flags change

Ian Lance Taylor
Fri May 6 14:58:00 GMT 2011

When we add a second and subsequent input section to an output section,
it's possible for the output section's flags to change.  That can in
turn mean that the output section should be placed in a different
location in the output segment.  This was causing a relro assertion
error in a case where a section changed from read-only to read-write,
thus moving from the text segment to the data segment.  The ordering was
remaining ORDER_READONLY, putting it before the relro sections in the
data segment, which of course does not work.  This patch fixes the
problem.  Committed to mainline and 2.21 branch.


2011-05-06  Ian Lance Taylor  <>

	* (Layout::layout): If the output section flags change,
	update the ordering.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 1005 bytes
Desc: patch
URL: <>

More information about the Binutils mailing list