This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Proposed patch] Huge performance regression in ld -r since binutils >= 2.21


On Mon, Nov 09, 2015 at 09:11:07PM +1030, Alan Modra wrote:
> - Sections are combined in ways that lose code locality.  eg. with
>   -ffunction-sections, all C static functions called "setup" will be
>   placed together.

I actually wondered/worried what happens when static functions with
the same name from multiple files are used with -ffunction-sections
and --gc-sections, when some are used but others are not. Would it
perhaps make sense for gcc to attach some sort of hash based on things
like the filename and function contents to the section name so that
these section names are unique? That would probably solve a lot of the
problems with ld -r, too, assuming -ffunction-sections is used.

Of course ld -r could also have an option to create _new_ sections
like this rather than merging sections.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]