From owner-cvs-all Sat Oct 10 17:15:43 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA19325 for cvs-all-outgoing; Sat, 10 Oct 1998 17:15:43 -0700 (PDT) (envelope-from owner-cvs-all) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA19320; Sat, 10 Oct 1998 17:15:37 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.9.1/8.9.1/Spinner) with ESMTP id HAA17737; Sun, 11 Oct 1998 07:47:24 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199810102347.HAA17737@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Mike Smith cc: Doug Rabson , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern link_aout.c In-reply-to: Your message of "Sat, 10 Oct 1998 11:28:32 MST." <199810101828.LAA09490@dingo.cdrom.com> Date: Sun, 11 Oct 1998 07:47:23 +0800 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Mike Smith wrote: > > > > The comment about not creating an a.out kernel module is an artifact of > > the initialization sequence. The boot loader creates a record for the > > kernel, and *both* link_elf.c and link_aout.c are run. They both see > > _DYNAMIC and will quite happily create a linker pseudo-file entry called > > "kernel". It's kinda neat seeing two kernels loaded at once, but I didn't > > want to think what would happen if the a.out module tried to interpret the > > elf _DYNAMIC pointer as an a.out object. > > If they were simply to check the *type* of the module (which they > really ought to in order to avoid looking for a symbol table in eg. a > splash screen image), then there'd be no problem with this. This particular bit of code is intended to work even when used from the standard bootblocks. It's got to build a kernel object even if there is no MODINFO_* type information available, otherwise the kld syscalls cannot work properly. Making the decision about which link_* module is going to make a "kernel" object at compile time is OK. We don't mix a.out and elf when building a kernel. Cheers, -Peter