Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why GCC executable are so bloated?

Name: Anonymous 2010-07-20 8:24

7kb of code for hello world?

Name: Anonymous 2010-07-21 2:40

>>34
Imports motherfucker, do you use them? The following gives 1KB.


C:\>type hello.c
#include <stdio.h>

int main() {
 printf("Hello world!\n");
 return 0;
}
C:\>cl /nologo /MD /Os hello.c /link /align:4096 /filealign:512 /merge:.data=.text /merge:.rdata=.text /section:.text,EWR /stub:stub64.exe /entry:main
C:\>hello
Hello world!

C:\>


Trimming off all the zeros at the end (WTF?) it comes down to 628 bytes. Not a bad amount of overhead at all.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List