File: nm.1

package info (click to toggle)
manpages-ja 0.5.0.0.20221215%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 29,304 kB
  • sloc: perl: 161; makefile: 61
file content (223 lines) | stat: -rw-r--r-- 6,754 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
.\" Copyright (c) 1991 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.\"
.\" Japanese Version Copyright (c) 1997 NAKANO Takeo all rights reserved.
.\" Translated Wed Dec 17 1997 by NAKANO Takeo <nakano@@apm.seikei.ac.jp>
.\"
.TH nm 1 "5 November 1991" "cygnus support" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
\(**
..

.SH 名前
nm \- オブジェクトファイルのシンボルをリストする

.SH 書式
.hy 0
.na
.TP
.B nm
.RB "[\|" \-a | \-\-debug\-syms "\|]" 
.RB "[\|" \-g | \-\-extern\-only "\|]"
.RB "[\|" \-B "\|]"  
.RB "[\|" \-C | \-\-demangle "\|]" 
.RB "[\|" \-D | \-\-dynamic "\|]" 
.RB "[\|" \-s | \-\-print\-armap "\|]" 
.RB "[\|" \-o | \-\-print\-file\-name "\|]"  
.RB "[\|" \-n | \-\-numeric\-sort "\|]" 
.RB "[\|" \-p | \-\-no\-sort "\|]"
.RB "[\|" \-r | \-\-reverse\-sort "\|]" 
.RB "[\|" \-\-size\-sort "\|]" 
.RB "[\|" \-u | \-\-undefined\-only "\|]"  
.RB "[\|" \-l | \-\-line\-numbers "\|]"
.RB "[\|" \-\-help "\|]"  
.RB "[\|" \-\-version "\|]"  
.RB "[\|" "\-t \fIradix" | \-\-radix=\fIradix "\|]"
.RB "[\|" \-P | --portability "\|]"
.RB "[\|" "\-f \fIformat" | \-\-format=\fIformat "\|]"
.RB "[\|" "\-\-target=\fIbfdname" "\|]"
.RB "[\|" \c
.I objfile\c
\&.\|.\|.\|]
.ad b
.hy 1
.SH 説明
GNU
.B nm
はオブジェクトファイル
.I objfile
からシンボルを抽出して表示する。 引数にオブジェクトファイルが与えられ
なかった場合は、
.B a.out
ファイルに対して動作する。

.SH オプション
オプションには長い形式と短い形式がある。並べて書いてある場合は、それら
が等価なオプションであることを意味する。

.TP
.B \-A
.TP
.B \-o
.TP
.B \-\-print\-file\-name 
それぞれのシンボルの前に、そのシンボルが含まれていた入力ファイルの名前
を配置する。通常は入力ファイルは一度だけ表示し、その後にそのファイルに
含まれているシンボルの一覧が続く。
 
.TP
.B \-a
.TP
.B \-\-debug\-syms 
デバッガ専用のシンボルも表示する。これらは通常はリストされない。
 
.TP
.B \-B
.B \-\-format=bsd
と同じ (MIPS の \fBnm\fP との互換性のために用意された)。
 
.TP
.B \-C
.TP
.B \-\-demangle
低位レベルのシンボル名をユーザーレベルの名前にデコード 
(\fIdemangle\fP) する。システムによって追加された、先頭部のアンダース
コアを全て削除するほか、 C++ の関数名を可読にする。

.TP
.B \-D
.TP
.B \-\-dynamic
通常のシンボルではなく動的 (dynamic) なシンボルを表示する。これはある
種の共有ライブラリなど、動的なオブジェクトに対してのみ意味を持つ。

.TP
.B "\-f \fIformat"
出力フォーマットに \fIformat\fP を用いる。 \fIformat\fP には ``bsd''、
``sysv''、 ``posix'' のいずれかを指定する。デフォルトは ``bsd'' である。
\fIformat\fP で認識されるのは最初の一文字だけである。大文字小文字は関
係ない。

.TP
.B \-g
.TP
.B \-\-extern\-only 
外部シンボル (external symbol) のみを表示する。

.TP
.B \-n
.TP
.B \-v
.TP
.B \-\-numeric\-sort 
シンボルをアドレスの数値によってソートする。通常は名前のアルファベット
順にソートされる。
 
.TP
.B \-p
.TP
.B \-\-no\-sort 
シンボルをまったくソートしない。単純に現われた順に表示する。
 
.TP
.B \-P
.TP
.B \-\-portability
出力フォーマットに、デフォルトのものではなく POSIX.2 標準のものを用い
る。 ``-f posix'' と等価。
 
.TP
.B \-s
.TP
.B \-\-print\-armap
書庫のメンバーからシンボルをリストするとき、インデックスをインクルード
する。インデックスとは
.B ar
または
.B ranlib
によって書庫に追加されるもので、その書庫にあるどのファイルにどんな名前
定義が含まれているかをマップする。

.TP
.B \-r
.TP
.B \-\-reverse\-sort 
ソート順を逆にする (数値の場合でもアルファベット順の場合でも)。最後の
ものが最初に来ることになる。

.TP
.B \-\-size\-sort 
シンボルをサイズの順にソートする。サイズはシンボルの値を、次に現われる
シンボルの値から引いた物である。シンボルの値ではなく、サイズが表示される。

.TP
.B "\-t \fIradix"
.TP
.B "\-\-radix=\fIradix"
\fIradix\fP をシンボルの値を表示するときの基数にする。 10 進数の場合は 
``d''、 8 進数には ``o''、 16 進数には ``x'' を指定する。

.TP
.BI "\-\-target=" "bfdname"
オブジェクトコードのフォーマットを指定する。通常はシステムのデフォルト
であるフォーマットが用いられる。指定できるフォーマットに関する情報を得
るための手法については
.BR objdump ( 1 )
を見よ。

.TP
.B \-u
.TP
.B \-\-undefined\-only 
未定義なシンボル (それぞれのオブジェクトファイルの外部にあるもの) のみ
を表示する。

.TP
.B \-l
.TP
.B \-\-line\-numbers
それぞれのシンボルに対して、デバッグ情報を用いてファイル名と行番号を見
つけようとする。定義されているシンボルに対しては、シンボルのアドレスの
行番号を探す。未定義なシンボルに対しては、シンボルを参照しているリロケー
ションエントリの行番号を探す。行番号の情報を見つけることができたら、他
のシンボルの情報に続いてそれを表示する。

.TP
.B \-V
.TP
.B \-\-version
.B nm
のバージョン番号を表示して終了する。

.TP
.B \-\-help
.B nm
のオプション一覧を表示して終了する。

.SH 関連項目
.B info
の `\fB binutils \fP' エントリ、
.IR "The GNU Binary Utilities" ,
Roland H. Pesch (October 1991)、
.BR ar "(" 1 ")、"
.BR objdump "(" 1 ")"
.BR ranlib "(" 1 ")"

.SH 著作権
.PP
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
.PP
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.