tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] How do you specify code model?


From: Somchai Smythe
Subject: Re: [Tinycc-devel] How do you specify code model?
Date: Mon, 9 Nov 2020 12:11:36 +0700

Thank you for responding with the answer.

I guess it's documented somewhere, and I tried to find out that way,
but failed.  I looked in the tcc git root directory README file, the
man page, the TODO, the wikipedia page
https://en.wikipedia.org/wiki/Tiny_C_Compiler,
https://bellard.org/tcc/, https://bellard.org/tcc/tcc-doc.html, and
tried using Google and Bing with no luck.  I tried grepping the source
and only found one file, ./elf.h, that was non-windows-centric and
mentioned models, but they didn't seem to indicate what model is used.
It did menion huge model though:

#define SHN_PARISC_HUGE_COMMON  0xff01     /* Common blocks in huge model.  */

which is why I asked the original question.

Perhaps in the future when the README is updated a note could be added
to say that at least for now, for 64 bit code on AMD64/INTEL64
systems, tcc generates small model code exclusively?


On 11/6/20, Michael Matz <matz.tcc@frakked.de> wrote:
> Hello,
>
> On Thu, 5 Nov 2020, Somchai Smythe wrote:
>
>> With gcc and clang, I specify the AMD64 large code model with
>> -mcmodel=large
>> but that doesn't seem to work for tcc.  What is the right way to do that
>> on tcc?
>
> tcc only supports the normal ("small") code model, so there's no way to
> specify a different one.  As the large code model is only useful when your
> overall code segment in the executable or a shared lib is larger than 2GB
> the feature isn't very useful even for GCC or LLVM.
>
>
> Ciao,
> Michael.
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>



reply via email to

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