Date: Wed, 30 Sep 1998 21:00:48 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: Peter Wemm <peter@freebsd.org> Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/boot/common load_elf.c Makefile.inc Message-ID: <Pine.BSF.4.01.9809302057550.388-100000@herring.nlsystems.com> In-Reply-To: <199809301938.MAA15062@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 30 Sep 1998, Peter Wemm wrote: > peter 1998/09/30 12:38:26 PDT > > Modified files: > sys/boot/common Makefile.inc > Added files: > sys/boot/common load_elf.c > Log: > ELF loader, part 1. It works with ELF kernels generated on the i386 > so far, and should probably be able to be made to work for the alpha > without too much trouble once it's connected up and my assumptions tested. > > I think (but have not tested) it will also load "old" ELF kernels that > were not linked with DYNAMIC headers. > > The module glue is yet to come. (oh fun.. :-) > > It does not explicitly load symbols [yet]. The _DYNAMIC data contains a > runtime symbol set that ddb can use via ddb/db_kld.c. It'll be missing > some detail that stabs normally provides (eg: number of args to a function, > line numbers, etc). On the other hand, those minimal symbols will always > be available even on a stripped kernel. > > This is mostly stolen from load_aout.c with some ideas from > alpha/libalpha/elf_freebsd.c. Debugging with db_kld.c is possible but since there are only global symbols available, its pretty limited. I have daydreamed about link_elf.c loading the real symbol sections in a DDB kernel (and sucking up the kernel symbol tables which db_elf.c is currently using). This would allow DDB to debug loaded modules nicely. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9809302057550.388-100000>