[PATCH] D65242: [ELF] More dynamic relocation packing

Vic Yang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 11:13:57 PDT 2019


victoryang added a comment.

In D65242#1604825 <https://reviews.llvm.org/D65242#1604825>, @pcc wrote:

> > Linking libmonochrome in Chromium for
> >  Android, targeting ARM32, I see a .rel.dyn of size 127697 bytes, as
> >  compared to 150532 bytes without this change.
>
> IIRC over 99% of relocations in libmonochrome were relative, so I didn't implement anything for the non-relative relocations, but maybe there are more non-relative relocations now. I can imagine that if say you were building it as a component build that would result in more non-relative relocations than in shipping builds. It may also be more compelling to mention how much this helps for the Android platform which I believe uses non-relative relocations more heavily.


Thanks for pointing this out! I've updated the description to include test results on Android.

> It may also be worth compressing `.rela.plt` now that we're compressing non-relative relocations.

Do we expect duplicated symbol lookup in .rela.plt? Honestly I'm not sure, but I'm under the impression that we'd have one PLT entry for each external function, so we won't see duplication?


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

https://reviews.llvm.org/D65242





More information about the llvm-commits mailing list