[PATCH][gold] gold/PR20717 Fix an issue where an unused orphan section is kept when the last output section has a KEEP statement.

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


As the "keep" flag was not initialized properly in case of an orphan
section, the section might be kept even though it was unused.

Best regards,
Igor Kudrin


	* script-sections.cc (Script_sections::output_section_name):
	Set output argument "keep" to false for orphan sections.
	* testsuite/Makefile.am (pr20717): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/pr20717.c: New test source file.
	* testsuite/pr20717.sh: New test script.
	* testsuite/pr20717.t: New test linker script.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gold-pr20717-gc-orphan-with-keep.patch.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20161019/fd780e39/attachment.txt>

More information about the Binutils mailing list