[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] regression testing with a complete i486-tcc-linux-mus
From: |
Yao Zi |
Subject: |
Re: [Tinycc-devel] regression testing with a complete i486-tcc-linux-musl.iso distribution |
Date: |
Sun, 17 Nov 2024 18:27:46 +0000 |
On Fri, Nov 15, 2024 at 06:27:20PM +0000, Michael Ackermann via Tinycc-devel
wrote:
> FYI:
> That is, for regression testing tcc which would have prevented me wasting
> weeks
> of bisecting, it is now possible:
> - to regularly compile/link/boot linux-2.4 x86
> - and a complete set of ~500 packages that i can support with tcc already
> (removed all direct and transitive c++ dependencies, among other patches)
Excellent work! A distro entirely built by TinyCC is really a cool
thing.
> Furthermore i cannot support dynamic-linking with tcc yet, because
> musl-libc libc.so dynamic loader crashes when compiled/linked with tcc
I had got dynamic linker of musl working on x86_64. The crashes I
encountered are mostly caused by calls to libc routines in an early
stage.
For example, TinyCC may emit calls to memcpy() for assignments between
structures, which is handled in tccgen.c: vstore(). This works most of
the time, but in the early stage of a dynamic linker, all these symbols
including memcpy() may have not been relocated, so such a call will jump
to a dummy address and segfaults.
GCC always emits a stos sequence in this case, which doesn't cause a
problem. I have done some similar "optimization" for TinyCC x86_64 to
eliminate the calls, see gen_struct_copy(): x86_64-gen.c. (I'm sorry
my original implementation was buggy and ugly....)
Another problem is the dynamic loader of musl cannot not handle a
zero-sized PT_LOAD segment correctly. I've sent an upstream patch[1] for
it, but there hasn't been any response.
Hope these helps.
> (bootstrappable.org got some patches for musl-libc for support with tcc
> statically linked);
> Hence i have to re-bundle what's currently maintained for tcc without
> ebuilds/portage/crossdev (python needs dynamic linking and fails with tcc),
> statically linked.
> Once the distribution is ready and available as a stable(!) baseline i'll
> summarize ISSUES, so these can be re-produced and verified against it easily
> without duplicate efforts.
>
> Grischka, if that's ok and doesn't cause too much confusion,
> i would appreciate if efforts are coordinated to avoid future regressions that
> required bi-secting accross more than 100 commits;
> for example release tag for 0.9.27 dates back 7 years already, and 0.9.28
> seems
> not sufficiently stabilized yet.
> Anyway, too i am planning to converge and re-integrate the tcc-toolchain
> system profile that i got with bootstrappable.org
> That is, currently i cannot publish yet, since it is too much cleanup work
> remaining to finalize a complete i486-tcc-linux-musl.iso distribution to work
> and test with, and i rather keep tcc synced to latest HEAD for this ;)
Looking forward to the release! I'm really interested in such a
distribution.
Cheers,
Yao Zi
[1]: https://www.openwall.com/lists/musl/2024/09/15/1
- [Tinycc-devel] severe regression in TCC compiling and linking kernel since may 2022, Michael Ackermann, 2024/11/12
- Re: [Tinycc-devel] severe regression in TCC compiling and linking kernel since may 2022, Vad Rulezz, 2024/11/12
- Re: [Tinycc-devel] severe regression in TCC compiling and linking kernel since may 2022, Michael Ackermann, 2024/11/12
- Re: [Tinycc-devel] severe regression in TCC compiling and linking kernel since may 2022, Vad Rulezz, 2024/11/12
- Re: [Tinycc-devel] severe regression in TCC compiling and linking kernel since may 2022, grischka, 2024/11/13
- [Tinycc-devel] regression testing with a complete i486-tcc-linux-musl.iso distribution, Michael Ackermann, 2024/11/15
- Message not available
- Message not available
- Re: [Tinycc-devel] regression testing with a complete i486-tcc-linux-musl.iso distribution, Michael Ackermann, 2024/11/16
- Re: [Tinycc-devel] regression testing with a complete i486-tcc-linux-musl.iso distribution, gz8cx4, 2024/11/17
- Re: [Tinycc-devel] regression testing with a complete i486-tcc-linux-musl.iso distribution,
Yao Zi <=
- [Tinycc-devel] musl dynamic loader libc.so miscompiled with tcc - Re: regression testing with a complete i486-tcc-linux-musl.iso distribution, Michael Ackermann, 2024/11/22