tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] severe regression in TCC compiling and linking kernel


From: grischka
Subject: Re: [Tinycc-devel] severe regression in TCC compiling and linking kernel since may 2022
Date: Wed, 13 Nov 2024 14:00:46 +0100
User-agent: Mozilla/5.0 (Windows NT 6.0; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 13.11.2024 00:41, Vad Rulezz wrote:
I'll look into it, having ability to build/boot linux is a nice thing.

I think the issue is may be the sections ordering while linking. Well, maybe 
something else too, but it't unlikely there is a lot of brokiness..

To have executable code come first in the "vmlinux" non-elf binary
you can try this:

in tccelf.c:sort_sections():
             if (s->sh_flags & SHF_EXECINSTR)
-                k = 0x70;
+                k = 0x30;

Currently (with k=0x70) it would put ro-data first.

-- grischka



Vad Rulezz

On 11/13/24 2:24 AM, Michael Ackermann via Tinycc-devel wrote:
This one from seyko2 is a good start for AoT compiling/linking linux-2.4:
https://github.com/seyko2/tccboot
FYI, for 16bit real-mode bootcode assembly binutils-as is needed,
32bit compiling/assembly/linking is handled nicely by tcc.
and i've mentioned the latest commit-id on mob branch that i tested with.

Myself too had tested tccboot JiT, which i succeeded with once with some updated
tcc mob branch version linked against, but didn't test any further, not yet.
tccboot is available from bellard.org

anyway, the regression on tcc mob branch seems rather severe, although it's
disclosed by kernel compilation for x86 only, i suspect it potentially affects
various other test-cases and architectures.

On 2024-11-13 00:56, Vad Rulezz wrote:
Hello Michael,

On 11/12/24 10:27 PM, Michael Ackermann via Tinycc-devel wrote:
The revert/backout diff that i could confirm that tcc succeeds compiling/linking
kernel with is attached.

Can you share a script or somewhat detailed instructions on how to build
linux kernel with TCC?


Vad Rulezz

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


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


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




reply via email to

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