Hello Alex,
2012/4/20 Alex D:
> Hello list.
>
> I use MinGW by MinGW-builds project[1].
>
> When I compiled this little code: int main() {return 0;}
> with this command line: gcc main.c -omain -s -O2
> I get the .exe file with size ~33 Kb. I think that this size is too big.
> I know that MinGW-builds project uses CRT from mingw-w64 project,
> that's why I write in this mailing-list.
>
> Tell me please, is this a normal size? What can be done to reduce the size?
>
> Thanks.to help
I can confirm that a smallest default executable build for 32-bit is
about 33.792 bytes in size. This size is caused by startup-code. You
can customize startup-code here, if you know that some features (like
eg pseudo-relocation) aren't required. By this you can save for sure
about 12k in size. But as standard startup has to support anything,
which might be used, it is a bit bigger as required in such a simple
case.
You can shrinken it size by specifying to linker specific PE
section/field-alignments (or using here for example hpux compression
tool). This can reduce this executable about some kB, too.
If you are interested in optimization of our startup-code to produce
smallest necessary code-size, be welcome to contribute to us.
Regards,
Kai
PS: Please subscribe first to this ML before posting to it
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public