Hi,

On Tue, 25 Jan 2022, Thorsten Otto via fpc-devel wrote:

> Yes, a.out support (which is used on Atari) has been dropped in 2.31.
> But i've added it back in, and cross-binutils of 2.34 can be found at
> http://tho-otto.de/crossmint.php#binutils

Won't really help. As you found out already, section smartlinking won't
work with a.out. It never worked in any version of binutils on any
platform. Actually I went the vasm/vlink route, because the AS/LD versions
I found online at the time I worked on the port, crashed hard on me on
EmuTOS/Hatari, and vasm/vlink just worked. Plus the vasm/vlink combo
supported section-based smartlinking. This is something actually I
requested from Frank Wille to be added to vlink, and he was nice enough to
add it for us. It's used on Amiga, Atari, and the Sinclair QL. Just for
reference without some kind of smartlinking, we'd end up having a 300K-ish
hello world... Instead of 25K-ish... So yeah.

(We do support individual .o/.a based smartlinking too, that should work
for Atari as well, but you'll literally end up growing roots, it's so
slow, I promise. So it just wasn't practical...)

> That does not mean that the section based linking will work. I'll have
> to check whether that can somehow be supported.

I based on my experience with customized binutils, recommend against
fighting with this. I'd much rather just generate an ELF binary, where all
the shiny features are available and tested, then convert it with some
tool to a native binary for the target. Actually we have several platforms
which do this or something similar already. If I'm not mistaken, GCC for
Atari used to have some tool like this? Brownout, maybe?

> Yes, but when i use gas, i think fpc won't generate the required section
> directives?

This is intentional. FPC knows that GAS for Atari uses a.out (or used at
the time, when I wired this together), and avoids generation sections,
because they just didn't work (they didn't even compile back then).

Anyway, all of this is 2017-18 wisdom, or so. I haven't looked into your
updated binutils yet, so feel free to correct me regarding it, if
something which hasn't been supported before now is. :)

Cheers,
--
Charlie
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to