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.

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

Reply via email to