From owner-freebsd-current Wed Oct 21 20:49:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA22513 for freebsd-current-outgoing; Wed, 21 Oct 1998 20:49:09 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from picnic.mat.net (picnic.mat.net [206.246.122.117]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA22482 for ; Wed, 21 Oct 1998 20:49:04 -0700 (PDT) (envelope-from chuckr@mat.net) Received: from localhost (chuckr@localhost) by picnic.mat.net (8.9.1/8.8.5) with ESMTP id XAA08404; Wed, 21 Oct 1998 23:48:04 -0400 (EDT) Date: Wed, 21 Oct 1998 23:48:03 -0400 (EDT) From: Chuck Robey To: The Hermit Hacker cc: freebsd-current@FreeBSD.ORG Subject: Re: How to strip a kernel in 3.0-RELEASE... In-Reply-To: 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 Thu, 22 Oct 1998, The Hermit Hacker wrote: > > Morning... > > Just had the pleasure of installing 3.0-RELEASE on a new drive, > and just hit something unexpected...'strip -d kernel' just doesn't seem to > work anymore :) > > What is the current method of doign this? Looking at the man > pages between the old and new strip, I suspect just: > > strip --strip-debug kernel > > But is there another that I want to do too? According to the old, > -d did both debugging and 'empty' symbols... Kernel's still aout ... try this: env OBJFORMAT=aout strip -d kernel That'll work. Have you checked out how the system deals with dual sets of build tools? This is probably boring to most, but I think it's the keenest thing, the way that stuff that needs to be aout or elf depending on the setting of OBJFORMAT exists in /usr/libexec/elf or /usr/libexec/aout, and the guys that get called in /usr/bin, like /usr/bin/ld, really just use /usr/bin/objformat to pick what kind of format you want, then kick off the real tool for you. You set /etc/objformat to have a single line, OBJFORMAT=, or you use a environmental variable. The make aout to elf does the /etc/objformat setting for you, so you can just adjust things temporarily with the environmental vars very nicely. Works for ports just as nicely. Sorry for the lecture, but maybe some don't know this (and I _am_ impressed by it all!) ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic (FreeBSD-current) (301) 220-2114 | and jaunt (NetBSD). ----------------------------+----------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message