Subject: Re: Looking for new kernel
To: None <amiga-dev@sun-lamp.cs.berkeley.edu>
From: Michael L. Hitch <osymh@gemini.oscs.montana.edu>
List: amiga-dev
Date: 02/22/1994 14:12:23
On Feb 21, 7:23pm, Bob Slawson wrote:
> loadbsd rejects any kernel I've built with a recent link editor
> (with LD=ld -Bstatic in the Makefile). I noticed that
>
> `file netbsd' linked with `ld -Bstatic -n ....' returns
> (this is from memory)
>
> NetBSD/m68k pure executable binary
>
> whereas when linked with ld.old from the 720 usr.bin
>
> old sun-2 pure executable binary
>
> `file vmunix.744' also returns "old sun-2 ..."
>
> Is there a deep reason why this anachronism is necessary? Are there
> differences other than the magic numbers? I think it would be
> convenient to be able to use a current link editor when building
> kernels rather than keeping a single purpose one around.
The kernel is not a demand-paged executable, which is what the
standard 'ld' will generate. The first page of a demand-paged
executable is linked to address 0x2000. The kernel has to be linked so
that the first byte of the code segment is linked at 0. Loadbsd and the
/dev/reload magic expect this, so you need the ld.old to create the
kernel executable.
Michael
--
Michael L. Hitch INTERNET: osymh@montana.edu
Computer Consultant BITNET: OSYMH@MTSUNIX1.BITNET
Office of Systems and Computing Services
Montana State University Bozeman, MT USA
------------------------------------------------------------------------------