Nm for .so files
Some object file formats permit more efficient access to small data objects, such as a global int variable as opposed to a large global array. For PE format files this indicates that the symbol is in a section specific to the implementation of DLLs. For ELF format files this indicates that the symbol is an indirect function. It indicates a symbol which if referenced by a relocation does not evaluate to its address, but instead must be invoked at runtime.
The runtime execution will then return the value to be used in the relocation. Note - the actual symbols display for GNU indirect symbols is controlled by the --ifunc-chars command line option. If this option has been provided then the first character in the string will be used for global indirect function symbols. If the string contains a second character then that will be used for local indirect function symbols. The symbol is a unique global symbol.
For such a symbol the dynamic linker will make sure that in the entire process there is just one symbol with this name and type in use. The symbol is a weak object. When a weak defined symbol is linked with a normal defined symbol, the normal defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the weak symbol becomes zero with no error.
On some systems, uppercase indicates that a default value has been specified. The symbol is a weak symbol that has not been specifically tagged as a weak object symbol. When a weak undefined symbol is linked and the symbol is not defined, the value of the symbol is determined in a system-specific manner without error.
The symbol is a stabs symbol in an a. All rights reserved Terms of Service. The nm commands provides information on the symbols being used in an object file or executable file. If the character is in lower case then the symbol is local but if the character is in upper case then the symbol is external Name of the symbol The characters that identify symbol type describe : A : Global absolute symbol.
B : Global bss symbol. D : Global data symbol. L : Global thread-local symbol TLS. T : Global text symbol. U : Undefined symbol.
Lakshmanan Ganapathy March 2, , am. Really good work… I enjoyed reading it. Yuvaraj March 5, , pm. Hi Friends, Really Good article. Matt March 7, , pm. If you specified -A and file is not a library, the format is. If you did not specify -A , the format is. If you did not also specify the -t option, nm displays value and size in hexadecimal. If you did not specify -A and the command line contains more than one file , or file is a library, nm displays a line preceding the list of symbols for each specified file or each object file in a specified library.
If file is a library, this line has the following format:. The format shall be one of d , o , or x , for decimal, octal, or hexadecimal, respectively.
If this option is not used, numbers are displayed in decimal. Microsoft equivalent of the nm command Ask Question. Asked 13 years, 1 month ago. Active 2 years, 11 months ago. Viewed 25k times. David Norman David Norman Add a comment.
Active Oldest Votes. Try dumpbin. Kunal Puri 3, 1 1 gold badge 8 8 silver badges 22 22 bronze badges. Tim Tim However, the MSDN documentation is next to worthless - a properly implemented --help argument could have superseeded it easily — dothebart.