[LLVMdev] An interesting comparison.
Richard Pennington
rich at pennware.com
Sun Aug 9 06:39:08 PDT 2009
[~/ellcc/test/source] main% cat printf.c
#include <stdio.h>
int main(int argc, char** argv)
{
printf("printf with the string \"%s\"\n", "my string");
}
[~/ellcc/test/source] main% ~/ellcc/ellcc/x86-elf-ecc printf.c
[~/ellcc/test/source] main% ./a.out
printf with the string "my string"
[~/ellcc/test/source] main% size a.out
text data bss dec hex filename
56459 3032 52 59543 e897 a.out
[~/ellcc/test/source] main% gcc -static printf.c
[~/ellcc/test/source] main% ./a.out
printf with the string "my string"
[~/ellcc/test/source] main% size a.out
text data bss dec hex filename
558317 1928 6948 567193 8a799 a.out
[~/ellcc/test/source] main%
Both a.out files are statically linked.
x86-ecc uses a libc based on newlib, gcc uses glibc (of course).
Is glibc really that ... big?
-Rich
More information about the llvm-dev
mailing list