1.TH SCC-NM 1 scc\-VERSION2.SH NAME3scc-nm \- list symbol table of object files4.SH SYNOPSIS5.B scc-nm6.RB [ \-APfgauv ]7.RB [ \-t8.IR format ]9.RI [ file ...]10.SH DESCRIPTION11.B scc-nm12lists the symbol table of each object13.I file14specified.15If no16.I file17arguments are given,18.B scc-nm19reads from20.B a.out21by default.22.PP23For each symbol,24.B scc-nm25writes 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.PP31.RS32.PD 033.TP34.B U35Undefined symbol.36.TP37.B T t38Symbol in the text (code) section.39.TP40.B D d41Symbol in the initialised data section.42.TP43.B B b44Symbol in the BSS (uninitialised data) section.45.TP46.B R r47Symbol in the read-only data section.48.TP49.B N50Debugging symbol.51.TP52.B ?53Symbol of unknown type.54.PD55.RE56.PP57By default, symbols of type58.BR ? ,59.BR N ,60section symbols, and file symbols are excluded from the output.61The62.B \-f63option includes them.64.PP65In the default output format, each symbol is printed on one line as:66.PP67.RS68.I value type name69.RE70.PP71where72.I value73is a 16-digit number in the specified radix.74For undefined symbols,75.I value76is printed as 16 spaces.77.PP78When processing multiple files, or when listing members of an archive,79a header line consisting of the file or member name followed by a colon80is printed before each group of symbols, unless81.B \-A82is specified.83.SH OPTIONS84.TP85.B \-A86Precede each output line with the pathname of the object file.87For archive members, the format is88.IB filename [ membname ]:89followed by a space.90.TP91.B \-a92Identical to93.BR \-f .94Include all symbols in the output.95.TP96.B \-f97Include all symbols in the output, including symbols of unknown type98.RB ( ? ),99debugging symbols100.RB ( N ),101section symbols, and file symbols.102Without this option, these symbols are excluded.103.TP104.B \-g105Display only global (external) symbols.106A symbol is global if its type character is uppercase.107.TP108.B \-P109Write information in a portable output format as specified by POSIX.110Each output line has the form:111.PP112.RS113.RS114.I name type115.RE116.RE117.PP118.RS119For symbols that are not undefined, the value and size follow,120both in the specified radix:121.RE122.PP123.RS124.RS125.I name type value size126.RE127.RE128.TP129.BI \-t " format"130Display symbol values and sizes using the specified numeric base.131.I format132must be one of:133.RS134.TP135.B d136Decimal.137.TP138.B o139Octal.140.TP141.B x142Hexadecimal (default).143.RE144.TP145.B \-u146Display only undefined symbols (type147.BR U ).148.TP149.B \-v150Sort symbols by value instead of by name.151Undefined symbols are sorted before defined symbols when sorting by value.152.SH OPERANDS153.TP154.I file155A pathname of an object file or archive library whose symbol table is156to be listed.157If no operands are given,158.B scc-nm159reads from160.BR a.out .161.SH EXAMPLES162List symbols from an object file:163.IP164.EX165scc-nm foo.o166.EE167.PP168List only global (external) symbols from an archive:169.IP170.EX171scc-nm \-g libfoo.a172.EE173.PP174List only undefined symbols:175.IP176.EX177scc-nm \-u foo.o178.EE179.PP180List symbols sorted by value:181.IP182.EX183scc-nm \-v foo.o184.EE185.PP186List all symbols including debugging and section symbols:187.IP188.EX189scc-nm \-f foo.o190.EE191.PP192List symbols in POSIX format with decimal values:193.IP194.EX195scc-nm \-P \-t d foo.o196.EE197.PP198Prefix each output line with the filename when processing multiple files:199.IP200.EX201scc-nm \-A foo.o bar.o202.EE203.SH STANDARDS204The205.B scc-nm206utility is designed to conform to IEEE Std 1003.1-2008 (POSIX.1).207.SH SEE ALSO208.BR scc-ar (1),209.BR scc-ranlib (1),210.BR scc-ld (1),211.BR scc-strip (1)