tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] a.out support (was Re: add an executable format?)


From: tccm
Subject: [Tinycc-devel] a.out support (was Re: add an executable format?)
Date: Sat, 4 Feb 2023 14:31:06 +0100

On Sat, Jan 21, 2023 at 07:03:52AM +0100, tccm wrote:
> I will test your patch and report here.

Hello Brian,

Many thanks for your code, it helped a lot.

I did not use the upstream build scripts/tools (including configure and
Makefile), they are not applicable on older platforms. IOW I did not
test this part of your patch.

The attached variant of elf2aout.c and a corresponding patch to other
files have been successfully tested on Minix-2.i386 and Minix-vmd.
After a bootstrap the compiler becomes self-hosted.
(The C standard library is rebuilt with Tiny CC to be available as elf)

This code produces stripped "common I&D" executables (symtab conversion
is skipped) with a 1MB stack+memory limit which afterwards can be adjusted
with Minix chmem utility.

I think that the changes as in the patch are very light and could be added
to upstream (suitably ifdef-conditioned) without adding any remarkable
weight to tcc. Using current configure to activate them can not work on
Minix-2 (unfortunately) but this does not make them unusable.

elf2aout.c contains platform-specific details. It works for Minix-2
and Minix-vmd but would need some ifdefs for other platforms. Would it
harm to add it to upstream, as a reference for possible future needs
and developers?

Improvements are of course possible, not least supporting separate I&D
or handling symbol tables, but this was beyond my current needs and is
left for a possible later exercise.

Thanks again, it is very useful to have a fast and compact C99-toolchain
on these lightweight kernels / OS.

Cheers
/tccm

Attachment: tcc_aout.patch
Description: Text Data

Attachment: elf2aout.c
Description: Text Data


reply via email to

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