gold patch committed: More adjustments to .interp

Ian Lance Taylor iant@google.com
Sun Jun 19 22:10:00 GMT 2011


The GNU linker create a PT_INTERP segment whenever it sees a .interp
section, even if --dynamic-linker is specified.  I think this is
moderately broken; when possible, we should rely on command line options
rather than magic section names.  However, glibc expects this behaviour,
so this patch changes gold to be compatible with GNU ld.  Committed to
mainline.

Ian


2011-06-19  Ian Lance Taylor  <iant@google.com>

	PR gold/12880
	* layout.cc (Layout::attach_allocated_section_to_segment): Add a
	.interp section to a PT_INTERP segment even if we have seen a
	--dynamic-linker option.  Don't do it if we have seen a PHDRS
	clause in a linker script.
	(Layout::finalize): Don't create a .interp section if we've
	already create a PT_INTERP segment.
	(Layout::create_interp): Always call choose_output_section (revert
	patch of 2011-06-17).  Don't create PT_INTERP segment.
	* script-sections.cc
	(Script_sections::create_note_and_tls_segments): Add a .interp
	section to a PT_INTERP segment even if we have seen a
	--dynamic-linker option.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 4540 bytes
Desc: patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20110619/8c1630e8/attachment.bin>


More information about the Binutils mailing list