Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could someone explain why touch program is 47 Kbytes size? Just checked my Ubuntu machine to confirm this.


Probably because it's statically linked with some standard libraries. If you write a hello world app in C++ and compile/link with all the defaults, you'll see similar results.


It is not. It even dynamically links to libpthread ...


You should use OpenBSD, then it's only 10k. As for why, objdump -s gives some hints. Lots of the file is really just zeros (you can see this with hexdump too), and the various sections of the file are padded for alignment.


I think you can blame the GNU `--date` option. It supports many, many possible input formats (http://www.gnu.org/s/coreutils/manual/html_node/Date-input-f...) and the implementation has to be quite complex.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: