gold patch committed: Fix handling of writable .eh_frame section

Ian Lance Taylor iant@google.com
Mon Jan 10 22:01:00 GMT 2011


In http://gcc.gnu.org/PR47248 there is a test case which fails when
using gold with -z relro.  It fails because one of the input files has a
writable .eh_frame section (which it shouldn't, but that is another
story).  A writable .eh_frame section is a relro section, and gold lays
it out accordingly.  However, it was not marked as a relro section, and
this caused gold to miscompute the relro segment padding.  This patch
fixes the problem.  This patch fixes the problem.  I also fixed a
possible lurking problem in the patch of 2010-10-17 in that
increase_relro was not reset in the case where set_section_addresses is
called a second time.  Committed to mainline and to 2.21 branch.

Ian


2011-01-10  Ian Lance Taylor  <iant@google.com>

	* layout.cc (Layout::layout_eh_frame): Mark a writable .eh_frame
	section as relro.
	(Layout::set_segment_offsets): Reset increase_relro before calling
	set_section_addresses a second time.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 1572 bytes
Desc: relro
URL: <https://sourceware.org/pipermail/binutils/attachments/20110110/6941672f/attachment.bin>


More information about the Binutils mailing list