Operating System - HP-UX
1753770 Members
5015 Online
108799 Solutions
New Discussion юеВ

Re: Meaning of a line in nm

 
Vibhor Kumar Agarwal
Esteemed Contributor

Meaning of a line in nm

Hello,

I did a
nm file.sl | grep cpp
and i got
[2123] | 4611686018428491448| 360|FUNC |LOCAL|0| .text|__sinit_Export_
cpp___Fv

I tried the man pages but somehow couldn't get the picture clear.
Can somebody help me in understanding the meaning of the above line.
Export.cpp was a source file in that .sl

Thanks
Vibhor Kumar Agarwal
2 REPLIES 2
harry d brown jr
Honored Contributor

Re: Meaning of a line in nm

You can try this manual: http://docs.hp.com/en/B2355-90655/index.html

or this: http://www.cs.utk.edu/~help/unix/libraries/

live free or die
harry d brown jr
Live Free or Die
Bejoy C Alias
Respected Contributor

Re: Meaning of a line in nm

nm is used to look at the symbol tables of an object file . The o/p format will be something like this.
Name Value Scope Type Subspace
C$10 | 40|static|data |$LIT$
main | 0|extern|entry |$CODE$
printf | |undef |code |
$
nm lists all symbol names and shows address, scope, symbol type and the location of the
symbol in the object. C$10 is an internally used symbol and not of interest here. main has an
external scope which means it is globally accessible, a type of entry means that the symbol is
inside the object, and it is contained on the code section of the object. The scope of printf is
undefined, it is only a code reference. The value column shows the location (address) of the
symbol inside the object.
Be Always Joy ......