[PATCH] D19528: [ELF] - Implemented -z combrelocs/nocombreloc.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 05:01:38 PDT 2016


On 28 April 2016 at 05:17, George Rimar <grimar at accesssoftek.com> wrote:
>>On 26 April 2016 at 06:30, George Rimar <grimar at accesssoftek.com> wrote:
>>> grimar created this revision.
>>> grimar added reviewers: ruiu, rafael.
>>> grimar added subscribers: grimar, llvm-commits.
>>>
>>> This is the option which sorts relocs to optimize dynamic linker performance.
>>> -z combelocs is the default in gold, also it ignores -z nocombreloc
>>> (https://sourceware.org/bugzilla/show_bug.cgi?id=11062), so I guess we can do the same.
>>> So this patch does not add handling of these options, just ignores them,
>>> but adds sorting of relocations before writing them to rel[a].dyn section.
>>>
>>> Details about option (taken from http://people.redhat.com/jakub/prelink.pdf, p.2):
>>
>>
>>Does this have any application outside of prelinking? As far as I can
>>tell that is pretty much dead.
>>
>>Cheers,
>>Rafael
>
> May be I am missing something, but I think -z combreloc is usefull ant
> very actual nowadays (up to 16% load time boost according to Ian Lance Taylor):
> http://www.airs.com/blog/archives/186

Can you run some benchmark? A shared build of clang might be a good example.

Also, that refers only to sorting. We should *not* be setting the
extra DT_* values. And since we are only interested in speeding up
startup, we don't need to sort based on the relocation being relative
or not.

Cheers,
Rafael


More information about the llvm-commits mailing list