Nm is mainly used to display the name list of various symbols in the symbol file. In some cases, if a file uses the strip function, that is, the -T break symbol, in this case, when nm and dyld are used, the results will be different. In this case, dyldinfo is needed to view the file.
If the input files are packaged, using nm will list the details of each file. The input file can be a standard libx.a(x.o) file, which lists. One and. O file.
By default, the value of each symbol name appears before the symbol name. When the -m option is used, the value will be followed by the following letters to represent the type of each symbol: U (undefined), A (absolute), T (symbol of T), D (symbol of D), B (symbol of B (bss), C (universal symbol), S (symbol other than the above symbol types) or. If the symbol appears in this document (not externally introduced), the type is lowercase.
If a symbol is an Objective-C method name, the symbol name will be+-[class _ name (category _ name) method: name:], where the+sign represents a class method and the-sign represents an example method (category _ name) represents a category.
By default, symbols are output alphabetically.