linker: catching up on section pgo-reordering modes

Nick Clifton nickc@redhat.com
Wed Jul 16 09:20:17 GMT 2025


Hi Frank.

> OK.  No qualms about adopting a preexisting llvm data format, then?

Nope  none at all.  In fact I would say that this is a much better approach
than inventing a new format.


>>> Maybe focusing on the infrastructure of sharing a corpus of
>>> profiling data?
> 
>> This will probably be the best way to start.  It will undoubtedly
>> encourage other uses of the profile data by other tools as well, which
>> is another bonus.
> 
> OK, I must have abidb [1] on the brain, because it seems like that could
> take the form of
> 
> - a community git repo or database into which contributors could upload data
> - a server-side tool to merge / order to create a consensus profile/ordering
>    (a la llvm-profdata merge/order) for a pool of binaries
> - a distribution mechanism to make that consensus content available to
>    builders (maybe just a git repo / tarball that could go into the
>    buildroot somewhere); heck maybe distribute a snapshot with binutils
>    someday
> - a gnu-ld option to search for that content and incorporate it into
>    section ordering (maybe something like
>    --sort-sections-for=$program --profile-corpus=/path/to/corpus )

Nice.  Yes this is exactly the kind of thing I was hoping you had in mind.

Re the option.  To my mind one option would be better than two, since they
are connected.  Something like --use-profiles=$program=/path/to/corpus
That is just me though.  You do whatever you feel is best.

Cheers
   Nick





More information about the Binutils mailing list