patch to nm allows nm to differentiate between weak functions and weak objects

Nick Clifton nickc@cygnus.com
Tue Jan 25 14:46:00 GMT 2000


Hi Thomas,

: We need to distiguish in an nm dump listing between symbols
: that are weak functions and symbols that are weak objects. nm
: only dumped weak syms without making the distinction. A new "letter"
: was added "V/v" to show weak objects...

This patch is mostly OK, but there are two problems:

  1. You need to extend the documentation (binutils.texi) to include
     the new symbols.

  2.  You need to fix the formatting of the comment describing the W
      and V symbols:

: !   if (symbol->flags & BSF_WEAK) 
: !     {
: !       /*
: ! 	W = weak function
: ! 	V = weak object
: !        */
: !     if (symbol->flags & BSF_FUNCTION)
: !       return 'W';
: !     else if (symbol->flags & BSF_OBJECT)
: ! 	return 'V';
: !     }

Cheers
	Nick


More information about the Binutils mailing list