3 gold testcases...

Ian Lance Taylor iant@google.com
Thu Apr 10 01:05:00 GMT 2008


Andreas Schwab <schwab@suse.de> writes:

> David Miller <davem@davemloft.net> writes:
>
>> 3) script_test_3 fails because the PT_LOAD segments created overlap
>>    within a page, and the kernel thus refuses to load the binary.
>>
>>    Actually, if I run the program as:
>>
>> 	bash$ /lib/ld-linux.so.2 ./script_test_3
>>
>>    it works, so I suppose the PT_LOAD mapping rules of the dynamic
>>    linker are more relaxed than that of the kernel.
>
> This is PR5996.

I just committed this patch to fix that bug.  This changes the
handling of PHDRS to not propagate non-PT_LOAD PHDRS entries to orphan
sections.

I updated the script_test_3.sh test case to verify that the size of
the .interp section is the same as the size of the PT_INTERP segment.

Ian


2008-04-09  Ian Lance Taylor  <iant@google.com>

	PR gold/5996
	* script-sections.cc (Sections_element::allocate_to_segment): Add
	orphan parameter.
	(Output_section_definition::allocate_to_segment): Likewise.
	(Orphan_output_section::allocate_to_segment): Likewise.
	(Script_sections::attach_sections_using_phdrs_clause): Don't
	propagate non-PT_LOAD segments to orphan sections.
	* testsuite/Makefile.am (script_test_3.stdout): Generate using
	readelf rather than objdump.
	* testsuite/script_test_3.sh: Adjust accordingly.  Test that
	.interp section and PT_INTERP segment are the same size.
	* testsuite/Makefile.in: Rebuild.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 7446 bytes
Desc: Don't propagate PHDRS to orphan sections
URL: <https://sourceware.org/pipermail/binutils/attachments/20080410/c9ce51e4/attachment.bin>


More information about the Binutils mailing list