Hi
I have compiled several progs with:
Pellesc and tcc to see exe size results.
(console simple "hello" prog and for win32 a chapter 7 (Checker1) from Petzold book)
So far:
tcc produce 1.50 kb (console) and 4.00 kb (win)
pelles pruduce 29.0 kb (console) and 10.5 kb (win).
I have tried same console progs to run with assembly:
masm32 and rosasm produce 2.50 kb.
Conclusion: tcc produce the smallest exe.
Can somebody explain the diff. ?
Thanks
ly
The user code in an exe file, for very simple programs, is few hundreds of bytes, the remaining is taken by startup code, the crt code, and PE-COFF file structure (a couple of hundred of bytes for headers, 8-16 bytes per each relocation in DLL's).
You can reduce the exe in two principal ways: linking with the DLL runtime, or use a simplified (and smaller) c runtime.
Read here (http://forum.pellesc.de/index.php?topic=88.0) for an example of reduced runtime for PellesC, or here (http://www.catch22.net/tuts/reducing-executable-size) for an article on the subject from catch22.
Hi frankie
Thanks.
Very interesting info.
ly