From owner-freebsd-current Sun Sep 6 10:53:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA08203 for freebsd-current-outgoing; Sun, 6 Sep 1998 10:53:30 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA08198 for ; Sun, 6 Sep 1998 10:53:28 -0700 (PDT) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id KAA00153; Sun, 6 Sep 1998 10:53:22 -0700 (PDT) (envelope-from jdp) Message-Id: <199809061753.KAA00153@austin.polstra.com> To: chuckr@glue.umd.edu Subject: Re: nm In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Cc: current@FreeBSD.ORG Date: Sun, 06 Sep 1998 10:53:21 -0700 From: John Polstra Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Chuck Robey wrote: > I notice that nm is one of those utils that has, like ld, completely > different versions for aout and for elf. I just tried to use nm on an > aout lib (choke, hack!) > > As a suggestion, does it seem reasonable to have a wrapper for nm such > that it read ONLY the -elf or -aout flag, stripped it off, and then > dispatched either the nm-elf or nm-aout tool? If there was neither flag > in existence, it could look for OBJFORMAT in the environment, and if > that failed, use /etc/objformat, else give an error message and die. I don't know what weird system you're running over there, but here's the situation on mine: blake$ ls -li /usr/bin/{nm,objformat} 55853 -r-xr-xr-x 9 bin bin 4420 Sep 4 16:36 /usr/bin/nm 55853 -r-xr-xr-x 9 bin bin 4420 Sep 4 16:36 /usr/bin/objformat blake$ ls -l /usr/libexec/{aout,elf}/nm -r-xr-xr-x 1 bin bin 9168 Sep 4 16:36 /usr/libexec/aout/nm -r-xr-xr-x 1 bin bin 157560 Sep 4 16:32 /usr/libexec/elf/nm In other words, your proposal was implemented long ago. Take a look at the sources for "objformat". -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message