GCC: Empty program == 23202 bytes?

c, c++, gcc, linker, tdm-mingw

Solution

Don't follow its suggestions, but for amusement sake, read this 'story' about making the smallest possible ELF binary.

Problem

``` test.c: int main() { return 0; } ``` I haven't used any flags (I am a newb to gcc) , just the command: ``` gcc test.c ``` I have used the latest TDM build of GCC on win32. The resulting executable is almost 23KB, way too big for an empty program. How can I reduce the size of the executable?

Original source

Related problems