[PATCH][gold] Use attributes of existing sections when placing orphan sections.

Igor Kudrin ikudrin@accesssoftek.com
Fri Oct 21 11:25:00 GMT 2016


Hi,

The current version of gold uses names of described output sections
to find places where to put orphan sections. If the sections in the
linker script have different names, gold fails to find the right place
for orphans. This patch addresses the issue by analyzing attributes
of existing section if they have unfamiliar names.

Best regards,
Igor Kudrin

---
gold/ChangeLog

	* script-sections.cc
	(Orphan_section_placement::find_place_index): New method.
	(Orphan_section_placement::output_section_init): Use method
	find_place_index() if we can't find the place by name.
	(Orphan_section_placement::find_place): Use find_place_index()
	to initialize variable index.
	* testsuite/Makefile.am (script_test_15): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/script_test_16.s: New test source file.
	* testsuite/script_test_16.sh: New test script.
	* testsuite/script_test_16.t: New test linker script.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gold-place-orphans-by-props.patch.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20161021/2520874c/attachment.txt>


More information about the Binutils mailing list