3 ms·
Is it really fair to do a size comparision between a statically linked C compiler written in Assembly and designed for readability with an a dynamically linked
by oriansj 7y ago
Is it really fair to do a size comparision between a statically linked C compiler written in Assembly and designed for readability with an a dynamically linked binary which has none of those things and was designed to win the International Obfuscated C Code Contest??
Also if you add up the binaries used via dynamic linking you are looking at which in the case of /lib/x86_64-linux-gnu/libc.so.6 is 16MB in size?
Did I mention it works on all x86+amd64 POSIX systems too?
- Dylan16807 7y agoThe un-obfuscated version is commented and readable and still only ~15KB of source code. It uses calloc, fopen, and fgetc, which can trivially forwarded to the same syscalls as stage0 with only a few bytes. It uses isalnum, isspace, isdigit, strcpy, and strstr, which are all trivial. Add all that up and maybe you need to penalize it by a kilobyte. I'm not sure exactly how it's using dlsym but it seems to also be worth few bytes. It's not using the other 16MB of libc.