[PATCH][gold] Combine definitions for sections with the same name.

Igor Kudrin ikudrin@accesssoftek.com
Wed Oct 19 15:20:00 GMT 2016


Hi,

It is possible to have definitions for an output section divided into
several linker scripts. For example, there might be a common linker
script and an additional linker script for a specific application,
which adds extra input sections into an existing output section.

Best regards,
Igor Kudrin

---
gold/ChangeLog

	* script-sections.cc
	(Output_section_definition::update_header): New method.
	(Output_section_definition::is_constraint_compatible): Likewise.
	(Output_section_definition::finish): Update fill_ and phdrs_.
	Issue an error if new settings are incompatible with the
	existing ones.
	(Script_sections::start_output_section): Update an existing
	output section definition if it has the same name and
	compatible constraints.
	* script-sections.h: Include <map>.
	(Script_sections::Known_output_sections_map): New typedef.
	(Script_sections::known_output_sections_): New member.
	* testsuite/Makefile.am (script_test_17): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/script_test_17.s: New test source file.
	* testsuite/script_test_17.sh: New test script.
	* testsuite/script_test_17.t: New test linker script.
	* testsuite/script_test_17a.t: Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gold-combine-section-definitions.patch.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20161019/b488987a/attachment.txt>


More information about the Binutils mailing list