Date: Sat, 10 Oct 1998 17:32:16 +0800 From: Peter Wemm <peter@netplex.com.au> To: Doug Rabson <dfr@nlsystems.com> Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern link_aout.c Message-ID: <199810100932.RAA14971@spinner.netplex.com.au> In-Reply-To: Your message of "Sat, 10 Oct 1998 10:44:32 %2B0100." <Pine.BSF.4.01.9810101041430.416-100000@herring.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Doug Rabson wrote: > On Fri, 9 Oct 1998, Peter Wemm wrote: > > > peter 1998/10/09 16:49:28 PDT > > > > Modified files: > > sys/kern link_aout.c > > Log: > > Updates for KLD backends. > > - symbol_values checks that the symbol is indeed belonging to the > > correct symbol and string table pairs before looking up. (since there > > could be many pairs, and KLD/DDB need to find out). > > - different ops for files versus preload modules - the unload mechanism > > is different. (a preloaded module has to be deleted on unload since > > the in-core image is tainted by relocation and variables used) > > - Do not build an a.out kernel module if we're running on an elf > > kernel. :-) Note that it should theoretically be possible to > > mix a.out and elf KLD modules providing -mno-underscores was used > > to compile it, or some other symbol conversion takes place. > > - Support preload modules (even though /boot/loader doesn't yet) > > - Search the module path when loading files. > > Actually link_aout.c already discards the leading underscore when > searching symbol tables. This was one of the requirements when I wrote it > to allow a transition to ELF without invalidating existing a.out modules. > I think John Polstra suggested it originally (it was a long time ago and > my memory is fading). I noticed that it was doing something like that, but didn't investigate to see exactly what it was doing. 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. Both formats are supported and I think both a.out and elf will work simultaniously, apart from any problems with symbol naming. Cheers, -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810100932.RAA14971>