This is the mail archive of the
mailing list for the binutils project.
GAS setting SHF_EXCLUDE on .gnu.lto_* sections considered harmful
- From: Richard Biener <rguenther at suse dot de>
- To: binutils at sourceware dot org
- Cc: hongjiu dot lu at intel dot com
- Date: Mon, 17 Aug 2015 14:42:19 +0200 (CEST)
- Subject: GAS setting SHF_EXCLUDE on .gnu.lto_* sections considered harmful
- Authentication-results: sourceware.org; auth=none
whilst developing the tooling for GCC LTO early debug I am running into
the issue that GAS sets SHF_EXCLUDE on all sections named .gnu.lto_*
GCC already sets that flag explicitely on all sections where it should go
and GNU ld already discards all .gnu.lto_* sections from a non-incremental
link via its default linker scripts and a proper /DISCARD/ section
Now the issue I am running into is that I desparately need access to
a .gnu.lto_* named section in the final link - namely the sections
containing LTO early debug in the object files generated during the
compile phase. They should of course still be discarded in case
of FAT binaries and a non-LTO link which they will via the GNU ld
default linker script.
GAS has no way of "unsetting" 'e' on .gnu.lto_ prefixed sections
as there is no "no flags, not even default" I can specify. Specifying
"ws" works (and GAS complains) on .gnu.lto_.debug_str but "ws" isn't
a good idea on random sections.
So - can we please imply revert 68efed4197a?