Michael Matz wrote:
Hi,
On Sat, 25 Nov 2017, Michael Matz wrote:
Hmm, let's see ... I'm fairly sure to have the .def file problem fixed
later today. The symtab unification I don't know yet, perhaps end of
the weekend or next week.
Both in mob now. I've tested 32bit and 64bit linux; some proper Windows
testing would be nice. (I've also checked in your improved variant of
the asm-c-connect test)
I like it. More lines removed than added could mean that it is
going in the right direction anyway ;)
From 'git log --shortstat'
tccasm: Unify C and asm symbol table
8 files changed, 165 insertions(+), 189 deletions(-)
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?
Seen that it can be counter-productive too, as with for example:
t1.c:
int main_2();
int main() {
asm("call x5");
return main_2();
}
int x5() {
printf("x5\n");
return 5;
}
t2.c:
int main_2() {
x5();
return 0;
}
$ 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.
--- grischka
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel