[PATCH] D61477: [ELF] -z combreloc: sort dynamic relocations by (!is_relative,symbol_index,r_offset)

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 00:33:01 PDT 2019


MaskRay added a comment.

In D61477#1492961 <https://reviews.llvm.org/D61477#1492961>, @grimar wrote:

> In D61477#1492942 <https://reviews.llvm.org/D61477#1492942>, @MaskRay wrote:
>
> > I don't know if DT_RELACOUNT was a glibc invention or a Sun invention. To be honest, if it is not that we've added it in the first place, I wouldn't suggest adding it :D
>
>
> I am not sure why we are discussing DT_RELACOUNT :), but there was a solid reason to add it I believe:
>  https://reviews.llvm.org/D23661


It's fine. Not too complex anyway :) (off-topic: musl could leverage the same optimization http://git.musl-libc.org/cgit/musl/tree/ldso/dynlink.c#n342 but it doesn't bother doing that probably because the improvement is insignificant)


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61477/new/

https://reviews.llvm.org/D61477





More information about the llvm-commits mailing list