From owner-freebsd-hackers Thu Mar 21 10:59:06 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA18877 for hackers-outgoing; Thu, 21 Mar 1996 10:59:06 -0800 (PST) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA18871 for ; Thu, 21 Mar 1996 10:59:03 -0800 (PST) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.6.12/8.6.12) with ESMTP id KAA16365 for ; Thu, 21 Mar 1996 10:59:02 -0800 Message-Id: <199603211859.KAA16365@austin.polstra.com> To: freebsd-hackers@freebsd.org Subject: "nm -og": binutils vs. FreeBSD vs. SunOS vs. Posix Date: Thu, 21 Mar 1996 10:59:02 -0800 From: John Polstra Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I need some advice about whether something in GNU binutils-2.6 is a bug or not. It has to do with the output of "nm -og *.o". The "nm" from binutils-2.6 offers three different output formats, "bsd", "sysv", and "posix". Both the "bsd" and "posix" formats produce output like this: bar.o:00000004 T _barproc bar.o: U _printf foo.o:00000004 T _fooproc foo.o: U _printf But FreeBSD's "nm" produces output like this: bar.o: bar.o:00000004 T _barproc bar.o: U _printf foo.o: foo.o:00000004 T _fooproc foo.o: U _printf The blank lines don't matter, but the "bar.o:" lines are crucial -- our "lorder" relies on them. I checked the bsd4.4-lite2 sources, and their "lorder" is identical to ours, so I assume that their "nm" has the same behavior as ours. So, I would say that GNU's "nm" is not giving correct "bsd" output. Except ... I also tried it on a SunOS-4.1 system, and their "nm" agrees with GNU's. So I don't know whether to report a bug to GNU or not. Two questions: What do other BSD-derived systems do? And, what does Posix say about it, if anything? If SunOS is the odd man out, then I could create a fourth format "sunos", fix the "bsd" behavior, and probably get GNU to accept the changes. Opinions, please. -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth