Date: Sun, 11 Oct 1998 07:47:23 +0800 From: Peter Wemm <peter@netplex.com.au> To: Mike Smith <mike@smith.net.au> Cc: Doug Rabson <dfr@nlsystems.com>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern link_aout.c Message-ID: <199810102347.HAA17737@spinner.netplex.com.au> In-Reply-To: Your message of "Sat, 10 Oct 1998 11:28:32 MST." <199810101828.LAA09490@dingo.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810102347.HAA17737>