Re: a.out formats, exec and amiga.

From: Andrew Valencia <vandys_at_nospam.org>
Date: Tue Nov 29 1994 - 20:17:50 PST

[Dave Hudson <dave@humbug.demon.co.uk> writes:]

>... The standard 1.3.2 version of ld has a bug which didn't
>get the QMAGIC text page alignment right if we were within 32 bytes of the
>end of a page (the problem with 1.3.2's rs232 server).

Go ahead and port the standard 1.3.2 version--my patches are minimal and
won't be needed to get things running.

Hacking pview's so they have a byte offset is pretty ugly. The problem is
that the VM page cache would no longer match the contents of the file. It
would really be a lot nicer if your port could honor a demand-page format of
a.out. Let me know if using VSTa's ld looks too nasty. I have a 68k cross
tool set for both i386/FreeBSD and Sparc/SunOS, so I could build some stuff
for you if it's a simple matter of bootstrapping.

Oh yes, you were wondering about the linker. It's not special; it's a
pretty simple port of the GNU binutils. It's a common trick that the first
4K of an a.out is mapped to 0x1000, the a.out header is thus the first 0x20
bytes, and the start address is 0x1020. This catches NULL pointer
dereferences, leaves pages from the a.out mapped on even page addresses, and
doesn't blow extra filespace for the a.out header.

Data starts at the first 4 meg boundary above the end of text. This allows
an old trick where the 2nd level PTE's for text can be shared among all
programs running the same a.out. VSTa uses this organization but doesn't
(currently) implement the optimization.

                                                        Regards,
                                                        Andy
Received on Tue Nov 29 19:55:02 1994

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:10 PDT