by kelnos · 15y ago · 0 comments
$ cat hello.c
int main() { printf("Hello, world!\n"); }
$ gcc hello.c
$ ls -l a.out
-rwxr-xr-x 1 brian staff 8.5K Oct 11 02:23 a.out*
And that's compiled code! And it also links to libc! But then again, any JS program requires tons of compiled C/C++ code to run.His original C app was about 6k, and 3k when stripped of debug symbols. Not content, he switched to assembly, which got him down to ... nah, I won't spoil the rest. ;)
$ gcc hello.c
$ ls -l a.out
-rwxr-xr-x 1 maht maht 4511 Oct 11 16:38 a.out
$ gcc --static hello.c
$ ls -l a.out
-rwxr-xr-x 1 maht maht 574106 Oct 11 16:38 a.out