tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Use TCC with GSL under Windows


From: Chen, Xianwen
Subject: Re: [Tinycc-devel] Use TCC with GSL under Windows
Date: Wed, 12 Oct 2016 01:08:04 +0200

Dear Daniel,

Thank you. I have tried to:
x86_64-w64-mingw32-gcc -s -Os hello.c

Interestingly, the generated exe is now 18 KB. Still, that is larger than 2 KB. :-)

Warm regards,
Xianwen


On Wed, Oct 12, 2016 at 12:49 AM, Daniel Glöckner <address@hidden> wrote:
Hi Xianwen,

On Tue, Oct 11, 2016 at 11:43:40PM +0200, Chen, Xianwen wrote:
> I have been very impressed by the size of exe's that TCC produces in
> Windows. For the simple hello_world.c, TCC produces an exe of 2 KB, while
> mingw-w64 produces an exe of 164 KB. Therefore, I would like to continue to
> learn to use TCC.

I'm pretty sure I've used MinGW to generate executables that small,
although that was probably 16 years ago.

Try to pass -s to GCC and don't use -g to get rid of symbol tables and
debugging information. Most of the time TCC generates more code than GCC,
especially when GCC is called with -Os.

The linker of MinGW might enforce different section alignments than TCC.
But that should add less than 10 kB of padding, regardless of the code
size.

Best regards,

  Daniel

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]