110 Chapter 4
Linker Tools
Viewing Symbols in an Object file with nm(1)
0000000000 U $global$ Other symbols created from
compiling.
1073741824 d $THIS_DATA$
1073741872 d $THIS_SHORTDATA$
1073741872 b $THIS_BSS$
1073741872 d $THIS_SHORTBSS$
0000000000 T main Global definition of main.
0000000000 U printf
0000000000 U scanf
0000000000 U sum_n
The first column shows the address of each symbol or reference. The
last column shows the symbol name. The second column denotes the
symbol's type:
Tindicates a global definition.
Uindicates an external reference.
dindicates a local definition of data.
bindicates a local definition of uninitialized data
(bss).
Thus, a global definition of sum_n is found in func.o. An external
reference to sum_n is found in main.o. External references to the C
printf and scanf routines are found in main.o. For details on the
use of nm, see nm(1).