[lld] size comparison script

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 13:05:44 PDT 2015


This a small script I wrote for comparing the size of two ELF binaries.

For example, this is what it prints when comparing a gold and a lld
linked clang:

.rodata                13979004 24179137
.eh_frame               1967596  2475516
.comment                    100    83161
.rela.dyn                   480    20400
.data                   3728960  3729104
.bss                     144124   144152
.hash                      2184     2192
.interp                      28       28
.init                        26       26
.got                      18864    18864
.tm_clone_table               0        0
.note.ABI-tag                32       32
.fini                         9        9
.note.GNU-stack               0        0
.fini_array                   8        8
.init_array                1880     1880
.jcr                          8        8
.note.gnu.gold-version       28        0
.got.plt                   2048     2016
.plt                       4064     4000
.shstrtab                   298      231
.symtab                 5667000  5666928
.rela.plt                  6072     5976
.dynamic                    592      448
.dynsym                    6744     6552
.gnu.version_r              336        0
.dynstr                    5315     4962
.gnu.version                562        0
.text                  41531081 41527673
.strtab                 7841007  6802265

So yes, SHF_STRING handling is next for me :-)

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmp-size.py
Type: text/x-python
Size: 900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151020/b700cac1/attachment.py>


More information about the llvm-commits mailing list