scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

  1.TH SCC-NM 1 scc\-VERSION
  2.SH NAME
  3scc-nm \- list symbol table of object files
  4.SH SYNOPSIS
  5.B scc-nm
  6.RB [ \-APfgauv ]
  7.RB [ \-t
  8.IR format ]
  9.RI [ file ...]
 10.SH DESCRIPTION
 11.B scc-nm
 12lists the symbol table of each object
 13.I file
 14specified.
 15If no
 16.I file
 17arguments are given,
 18.B scc-nm
 19reads from
 20.B a.out
 21by default.
 22.PP
 23For each symbol,
 24.B scc-nm
 25writes to standard output the symbol value, type, and name.
 26The symbol type is represented as a single character.
 27Uppercase letters denote global (external) symbols;
 28lowercase letters denote local symbols.
 29The following type characters are commonly used:
 30.PP
 31.RS
 32.PD 0
 33.TP
 34.B U
 35Undefined symbol.
 36.TP
 37.B T t
 38Symbol in the text (code) section.
 39.TP
 40.B D d
 41Symbol in the initialised data section.
 42.TP
 43.B B b
 44Symbol in the BSS (uninitialised data) section.
 45.TP
 46.B R r
 47Symbol in the read-only data section.
 48.TP
 49.B N
 50Debugging symbol.
 51.TP
 52.B ?
 53Symbol of unknown type.
 54.PD
 55.RE
 56.PP
 57By default, symbols of type
 58.BR ? ,
 59.BR N ,
 60section symbols, and file symbols are excluded from the output.
 61The
 62.B \-f
 63option includes them.
 64.PP
 65In the default output format, each symbol is printed on one line as:
 66.PP
 67.RS
 68.I value type name
 69.RE
 70.PP
 71where
 72.I value
 73is a 16-digit number in the specified radix.
 74For undefined symbols,
 75.I value
 76is printed as 16 spaces.
 77.PP
 78When processing multiple files, or when listing members of an archive,
 79a header line consisting of the file or member name followed by a colon
 80is printed before each group of symbols, unless
 81.B \-A
 82is specified.
 83.SH OPTIONS
 84.TP
 85.B \-A
 86Precede each output line with the pathname of the object file.
 87For archive members, the format is
 88.IB filename [ membname ]:
 89followed by a space.
 90.TP
 91.B \-a
 92Identical to
 93.BR \-f .
 94Include all symbols in the output.
 95.TP
 96.B \-f
 97Include all symbols in the output, including symbols of unknown type
 98.RB ( ? ),
 99debugging symbols
100.RB ( N ),
101section symbols, and file symbols.
102Without this option, these symbols are excluded.
103.TP
104.B \-g
105Display only global (external) symbols.
106A symbol is global if its type character is uppercase.
107.TP
108.B \-P
109Write information in a portable output format as specified by POSIX.
110Each output line has the form:
111.PP
112.RS
113.RS
114.I name type
115.RE
116.RE
117.PP
118.RS
119For symbols that are not undefined, the value and size follow,
120both in the specified radix:
121.RE
122.PP
123.RS
124.RS
125.I name type value size
126.RE
127.RE
128.TP
129.BI \-t " format"
130Display symbol values and sizes using the specified numeric base.
131.I format
132must be one of:
133.RS
134.TP
135.B d
136Decimal.
137.TP
138.B o
139Octal.
140.TP
141.B x
142Hexadecimal (default).
143.RE
144.TP
145.B \-u
146Display only undefined symbols (type
147.BR U ).
148.TP
149.B \-v
150Sort symbols by value instead of by name.
151Undefined symbols are sorted before defined symbols when sorting by value.
152.SH OPERANDS
153.TP
154.I file
155A pathname of an object file or archive library whose symbol table is
156to be listed.
157If no operands are given,
158.B scc-nm
159reads from
160.BR a.out .
161.SH EXAMPLES
162List symbols from an object file:
163.IP
164.EX
165scc-nm foo.o
166.EE
167.PP
168List only global (external) symbols from an archive:
169.IP
170.EX
171scc-nm \-g libfoo.a
172.EE
173.PP
174List only undefined symbols:
175.IP
176.EX
177scc-nm \-u foo.o
178.EE
179.PP
180List symbols sorted by value:
181.IP
182.EX
183scc-nm \-v foo.o
184.EE
185.PP
186List all symbols including debugging and section symbols:
187.IP
188.EX
189scc-nm \-f foo.o
190.EE
191.PP
192List symbols in POSIX format with decimal values:
193.IP
194.EX
195scc-nm \-P \-t d foo.o
196.EE
197.PP
198Prefix each output line with the filename when processing multiple files:
199.IP
200.EX
201scc-nm \-A foo.o bar.o
202.EE
203.SH STANDARDS
204The
205.B scc-nm
206utility is designed to conform to IEEE Std 1003.1-2008 (POSIX.1).
207.SH SEE ALSO
208.BR scc-ar (1),
209.BR scc-ranlib (1),
210.BR scc-ld (1),
211.BR scc-strip (1)