[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] tips? define asm symbol as global if it is extern in
Re: [Tinycc-devel] tips? define asm symbol as global if it is extern in C
Mon, 18 May 2015 18:23:10 +0200
Thunderbird 18.104.22.168 (Windows/20090812)
Sergey Korshunoff wrote:
And why does tinycc need this? If you want the symbol to be
global, you can add ".globl" to your asm.
This snipped is taken from the linux 2.4.26 (2.4.37) kernels. It looks
like there is no such code in 2.6+ kernels.
PS: yes, I can live w/o this. There are other places which require a
patching of the kernel.
Well, compiling the kernel is maybe an interesting experiment, however
tinycc would have a _very_ long way to go until it could produce
one that you'd want to recommended to anyone to run on real hardware.
If it helps to fix small bugs or to add features that fit in nicely,
fine. However not a good idea if its just workarounds. Because if
you want tinycc to become more reliable then workarounds is the least
thihg you need. (What you need is a new tccgen.c at least - you can
start today ;)
Ps, in this case, it works in gcc because gcc compiles C to asm first,
and then as resolves the symbol. There is no natural solution to this