Richard Pennington
2014-Sep-27 17:05 UTC
[LLVMdev] Executable size comparison for different targets.
Here is a size comparison of compiling bzip2 for different targets using the ELLCC clang/LLVM based cross development tool chain (http://ellcc.org): -target Endian Float armeb-linux-engeabi Big Soft armeb-linux-engeabihf Big Hard arm-linux-engeabi Little Soft arm-linux-engeabihf Little Hard i386-linux-eng Little Hard mipsel-linux-eng Little Hard mipsel-linux-engsf Little Soft mips-linux-eng Big Hard mips-linux-engsf Big Soft ppc-linux-eng Big Hard x86_64-linux-eng Little Hard /ellcc/test/src/bzip2-1.0.6] dev% size bzip2*-linux-* text data bss dec hex filename 177316 3632 7828 188776 2e168 bzip2.armeb-linux-engeabi 170356 3632 7828 181816 2c638 bzip2.armeb-linux-engeabihf 177332 3632 7828 188792 2e178 bzip2.arm-linux-engeabi 170364 3632 7828 181824 2c640 bzip2.arm-linux-engeabihf 156750 3620 7812 168182 290f6 bzip2.i386-linux-eng 314676 3632 7820 326128 4f9f0 bzip2.microblaze-linux-eng 205476 3656 7900 217032 34fc8 bzip2.mipsel-linux-eng 213608 3656 7900 225164 36f8c bzip2.mipsel-linux-engsf 205492 3656 7900 217048 34fd8 bzip2.mips-linux-eng 213632 3656 7900 225188 36fa4 bzip2.mips-linux-engsf 180680 3632 7828 192140 2ee8c bzip2.ppc-linux-eng 164482 3992 8640 177114 2b3da bzip2.x86_64-linux-eng Soft float adds about 7K to the size of the executable compared to its hard float counterpart, which sounds about right. These executables are all statically linked with musl and compiler-rt. A dynamically linked executable for x86_64 looks like this: [~/ellcc/test/src/bzip2-1.0.6] dev% size bzip2 text data bss dec hex filename 120131 4176 4400 128707 1f6c3 bzip2 -Rich