This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: nm and objdump when no symbols
Alan Modra <amodra@bigpond.net.au> writes:
> On Sun, Aug 11, 2002 at 07:55:20AM +0100, Nick Clifton wrote:
> > I am open to either interpretation however, so if you want to move the
> > message to stdout, please do so.
>
> Before I forget. I agree with John Reiser's suggestion that nm should
> print nothing to stdout when there are no symbols.
nm is standardized by POSIX.2, so any changes to default output should
be made with reference to the standard.
According to IEEE Std 1003.2-1992 section 5.21.2, ``If no symbolic
information is available for a valid input file, the nm utility shall
report that fact, but should not consider that an error condition.''
My reading of the rest of 5.21 is that the fact should be reported on
stderr.
Ian