[PATCH] Make mergeable read-only sections per-function, if requested.
Jeff Law
law@redhat.com
Thu May 7 13:29:00 GMT 2015
On 05/07/2015 02:15 AM, Marek Polacek wrote:
> On Wed, May 06, 2015 at 03:59:33PM -0700, Segher Boessenkool wrote:
>> Currently GCC does not put mergeable read-only data in a per-function
>> section, so the -gc-sections linker option does not do much for such
>> data. Fix that.
>
> Dunno if it is a good idea, but...
Why not? In a static build it gives the linker a chance to remove
unreferenced data or to reorder the data to be more tlb or dcache
friendly. That's the whole purpose behind -f{function,data}-sections.
Jeff
More information about the Gcc-patches
mailing list