tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Segfault with .skip


From: Michael Matz
Subject: Re: [Tinycc-devel] Segfault with .skip
Date: Mon, 21 Jan 2019 18:34:53 +0000 (UTC)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]