[PATCH] nm output fix for sysv format.

Nick Clifton nickc@cambridge.redhat.com
Mon May 13 12:27:00 GMT 2002


Hi Elias,

> This (not so perfect) patch fixes the output of nm, when it used
> with the sysv format. It eliminates output such as:
> 
> % nm -fsysv /usr/lib/libc.a
> [snipped]
> __pthread_initialize|        |   w  |                  |      |     |
> __pthread_initialize_minimal|        |   w  |                  |      |     |
> [snipped]
> 
> I would appreciate any feedback on that (even if the patch is not ok).

*sigh*.  I would like to accept this patch, but I am afraid that I
cannot.  The problem is that your patch splits the symbol name up over
multiple names, which means that nm's output would not work very well
with tools like grep.

Imagine searching for symbols containing the string 'minimal'.  With
the emaple output you have above, but with your patch applied, grep
would return:

  _minimal|        |      |                  |      |     |

which gives no indication of the symbol's class, and which implies
that the symbol's name is "_minimal" and not
"__pthread_initialize_minimal".

Cheers
        Nick



More information about the Binutils mailing list