[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Unify C and asm symbols
From: |
Michael Matz |
Subject: |
Re: [Tinycc-devel] Unify C and asm symbols |
Date: |
Mon, 4 Dec 2017 04:04:41 +0100 (CET) |
User-agent: |
Alpine 2.20 (LSU 67 2015-01-07) |
On Tue, 28 Nov 2017, grischka wrote:
I like it. More lines removed than added could mean that it is going in
the right direction anyway ;)
Hehe :)
Question: I wonder whether now we could maybe get rid of the asm label
"post-processing" (asm_free_labels) and the asm_label stack altogether?
That requires surgery in how linking is done (in a sense moving that
post-processing from asm symbols from compilation to linking time). I
believe this ultimately will be good anyway, as there are currently
various strangenesses and corner cases that are buggy especially involving
multi-file compilation (i.e. without intermediate .o files), or multi-file
-run. I think I'll work on that somewhen the next days, but it'll be a
bit hairy and potentially disruptive, so the release doesn't have to wait.
In the meantime ...
Seen that it can be counter-productive too, as with for example:
...
$ tcc -c t1.c t2.c && tcc t1.o t2.o -o t.exe && t.exe
tcc: error: undefined symbol 'x5'
$ tcc -c t1.c && objdump -x t1.o
SYMBOL TABLE:
00000000 l df *ABS* 00000000 t1.c
0000004a l .text 0000001f x5
Here 'x5' should have the g[lobal] binding from C.
... I have fixed this in mob with a one-liner instead :)
Ciao,
Michael.
- Re: [Tinycc-devel] Unify C and asm symbols,
Michael Matz <=
- Re: [Tinycc-devel] Unify C and asm symbols, grischka, 2017/12/04
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/04
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/04
- Re: [Tinycc-devel] Unify C and asm symbols, grischka, 2017/12/06
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/10
- Re: [Tinycc-devel] Unify C and asm symbols, grischka, 2017/12/10
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/10
- Re: [Tinycc-devel] Unify C and asm symbols, Christian Jullien, 2017/12/11
- Re: [Tinycc-devel] Unify C and asm symbols, grischka, 2017/12/12
- Re: [Tinycc-devel] Unify C and asm symbols, Christian Jullien, 2017/12/12