Hi,

On Fri, 18 Jan 2019, Giovanni Mascellani wrote:

> while trying to compile some Linux kernel code, I found that tcc crashes
> when given the following .s file:
> 
> ------------------------
> .skip 2f-1f,0x90
> 1:
> 2:
> ------------------------
> 
> It works correctly with backward references. Is there any hope to fix it
> to accept forward references as well?

Everything could be fixed :-)  As it would require changes to the internal 
data structures and would mean ditching the single-pass nature of the 
assembler it's a very non-trivial fix, though.  You effectively would have 
to go to a frag model of potentially-unknown-sized chunks of bytes and a 
list of still unresolved addresses that you iterate over until all are 
resolved.  Like e.g. GNU assembler has.  Not tiny at all :)


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to