Hacker News new | past | comments | ask | show | jobs | submit login

I am only guessing but I suspect the binary will be tiny. The earlier article you mentioned described how hello world is surprisingly large with libc overheads. It then sets out to eliminate those overheads and concentrates on the problems involved in doing that. But it doesn't mention how small the binary gets once those overheads are successfully eliminated, My expectation would be just a handful of bytes.



In my case the binary turned out to be much larger than I would have expected. I was expecting a couple hundred bytes tops, but 8k?

  osx-box:dev esa$ nasm -f macho hello.asm && ld -e _start -o hello hello.o

  osx-box:dev esa$ ls -lh hello*
  -rwxr-xr-x  1 esa  staff   8.1K Sep  5 22:43 hello
  -rw-r--r--  1 esa  staff   721B Sep  5 22:39 hello.asm
  -rw-r--r--  1 esa  staff   389B Sep  5 22:43 hello.o




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: