nm 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. .TH NM 1
  2. .SH NAME
  3. nm \- name list (symbol table)
  4. .SH SYNOPSIS
  5. .B nm
  6. [
  7. .B -aghnsu
  8. ]
  9. .I file ...
  10. .SH DESCRIPTION
  11. .I Nm
  12. prints the name list of each executable or object
  13. .I file
  14. in the argument list.
  15. If the
  16. .I file
  17. is an archive
  18. (see
  19. .IR ar (1)),
  20. the name list of each file in the archive is printed.
  21. If more than one file is given in the argument list,
  22. the name of each file is printed at the beginning of each line.
  23. .PP
  24. Each symbol name is preceded by its hexadecimal
  25. value (blanks if undefined)
  26. and one of the letters
  27. .TP
  28. .B T
  29. text segment symbol
  30. .PD0
  31. .TP
  32. .B t
  33. static text segment symbol
  34. .TP
  35. .B L
  36. leaf function text segment symbol
  37. .TP
  38. .B l
  39. static leaf function text segment symbol
  40. .TP
  41. .B D
  42. data segment symbol
  43. .TP
  44. .B d
  45. static data segment symbol
  46. .TP
  47. .B B
  48. bss segment symbol
  49. .TP
  50. .B b
  51. static bss segment symbol
  52. .TP
  53. .B a
  54. automatic (local) variable symbol
  55. .TP
  56. .B p
  57. function parameter symbol
  58. .TP
  59. .B z
  60. source file name
  61. .TP
  62. .B Z
  63. source file line offset
  64. .TP
  65. .B f
  66. source file name components
  67. .PD
  68. .PP
  69. The output is sorted alphabetically.
  70. .PP
  71. Options are:
  72. .TP
  73. .B -a
  74. Print all symbols; normally only user-defined text, data,
  75. and bss segment symbols are printed.
  76. .TP
  77. .B -g
  78. Print only global
  79. .RB ( T ,
  80. .BR L ,
  81. .BR D ,
  82. .BR B )
  83. symbols.
  84. .TP
  85. .B -h
  86. Do not print file name headers with output lines.
  87. .TP
  88. .B -n
  89. Sort according to the address of the symbols.
  90. .TP
  91. .B -s
  92. Don't sort; print in symbol-table order.
  93. .TP
  94. .B -u
  95. Print only undefined symbols.
  96. .SH SOURCE
  97. .B /sys/src/cmd/nm.c
  98. .SH SEE ALSO
  99. .IR ar (1),
  100. .IR 2l (1),
  101. .IR db (1),
  102. .IR acid (1),
  103. .IR a.out (6)