From owner-freebsd-current Mon Dec 28 03:13:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA18518 for freebsd-current-outgoing; Mon, 28 Dec 1998 03:13:50 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA18513 for ; Mon, 28 Dec 1998 03:13:47 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by nlsystems.com (8.9.1/8.8.5) with SMTP id KAA03237; Mon, 28 Dec 1998 10:45:56 GMT Date: Mon, 28 Dec 1998 10:45:56 +0000 (GMT) From: Doug Rabson To: Greg Lehey cc: FreeBSD current users Subject: Re: How do I build an a.out kld? In-Reply-To: <19981228145909.R12346@freebie.lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 28 Dec 1998, Greg Lehey wrote: > I find I have to change to klds in a hurry, and have just run across a > number of problems. I'm running an a.out kernel, which loads ELF klds > quite happily (once you know that there's an undocumented search path, > but that you can win by specifying a full pathname). The problem is > that there are two versions of gdb, one of which recognizes only a.out > (the kernel), and the other only ELF (the kld). I appear to have > three choices: > > 1. I can build an ELF kernel. My understanding is that this will > also require me to install the new style boot blocks. Correct? > If so, is there any documentation on what to do here? Mostly. If you have fairly recent boot blocks, you can try typing '/boot/loader' to your existing bootblocks which should leave you in the third stage boot. > > 2. I could build an a.out kld. Unfortunately, there's an > (undocumented) program called gensetdefs which runs against the > objects, and expects only ELF files. It doesn't understand an > -aout flag. Can I get past this problem? Are you using bsd.kmod.mk? If you look at it, gensetdefs is only used for elf. Linking an a.out module is even simpler: ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${OBJS} ${KMODDEPS} Try 'make OBJFORMAT=aout' and see what happens. > > 3. I could fix gdb to understand both a.out and ELF formats, but I > don't think I'll do it today. I looked at this when I made it work for ELF and it was going to be hard to support both elf and a.out shared libs. Its easy to build an a.out gdb and keep it around for odd jobs which require a.out support. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message