[PATCH] D56325: Sort symbols in .bss by size.

Vic Yang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 4 13:05:04 PST 2019


victoryang added a comment.

In D56325#1346810 <https://reviews.llvm.org/D56325#1346810>, @ruiu wrote:

> > For .data section specifically, the logic does apply, and I saw more memory saving when I sorted .bss+.data vs only .bss on Android. Applying this to all SHF_WRITE sections should be fine. It is possible that sorting results in no memory save at all in the worst case, but that shouldn't be a problem.
>
> Do you have a number on how much memory you could save on Android by sorting .data section? I'm pretty interested in that number
>  .


On the build I was testing, sorting .bss alone saved ~1.7MB across the system. Sorting .bss+.data saved ~2.6MB. The numbers of course vary depending on the build, but this shows the saving from sorting .data is non-trivial.


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

https://reviews.llvm.org/D56325





More information about the llvm-commits mailing list