[PATCH] D24644: Pass -ffunction-sections/-fdata-sections along to gold-plugin
Teresa Johnson via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 1 07:48:44 PDT 2016
tejohnson added a comment.
In https://reviews.llvm.org/D24644#557774, @pcc wrote:
> Perhaps it would be better to enable -ffunction-sections/-fdata-sections unconditionally at the linker level if the linker supports it? See also PR22999.
My understanding is that these are not typically the default because it makes the resulting object files larger and the link slower. OTOH, for ThinLTO we definitely benefit more from these optimizations (and from PR22999 looks like there is a compelling reason to want this for LTO as well).
However, when you say enable them "unconditionally at the linker level" what do you mean - these need to go LLVM via plugin options. Are you suggesting having them enabled unconditionally in both gold-plugin and gold? That will require changes to both llvm and binutils, and the latter will have effects for other compilers. What about -Wl,-gc-sections, isn't that also needed to make effective use of these options?
https://reviews.llvm.org/D24644
More information about the cfe-commits
mailing list