Compile link------nm command _ Compile link

Source: Internet
Author: User
Tags decode all


Use

Displays symbolic information about object files, executables, and object files libraries. Grammar

NM [-A] [-c] [-x {32|64|32_64|d64| any}] [-f] [-h] [-l] [-p] [-r] [-T] [-e] [-G |-u] [-D |-o |-X |-tformat] File ... Description

The NM command displays information about the symbol in the specified file, which can be an object file, an executable file, or an object file library. If the file does not contain symbolic information, the NM command reports the situation, but does not interpret it as an error condition. The NM command reports numeric values under decimal notation by default.

The NM command writes the following symbolic information to the standard output: library or object name

If you specify the-a option, the NM command only reports on the file or library or object name. Symbol name Symbol type

The NM command represents a file symbol type using the following symbols, which represent weak symbols as global symbols with the same characters:

Project Description
A Global absolute symbol.
A Local absolute symbol.
B Global BSS symbol.
B Local BSS symbol.
D Global data symbol.
D Local data symbol.
F The Source file name symbol.
L Global thread-local symbol (TLS).
L Static thread-local symbol (TLS).
T Global text symbol.
T The local text symbol.
U Undefined symbol.
Value size

If applicable, the NM command reports the size associated with the symbol. Sign

Project Description
-A Each row or display the full path name or display the object library name.
-B Display output in the Berkeley software distribution (BSD) format:
Value   type   name
-C Restricted decoding (Demangle) C + + name. The default is to decode all C + + symbol names. Note: Symbols in C + + object files have their names decoded before they are used.
-D Displays the value and size of the symbol in decimal. This is the default value.
-E Only static and external (global) symbols are displayed.
-F Displays the full output, including redundant. Text,. Data, and. BSS symbols, which are usually limited.
-G only external (global) symbols are displayed.
-H Limits the display of output header data.
-L Distinguishes WEAK and GLOBAL symbols by attaching a * to the WEAK symbol's encoding key. If used with the-p option, the symbol type for the WEAK symbol appears as follows: V WEAK Data symbol w WEAK Text symbol w WEAK undefined symbol Z WEAK BSS symbol
-O Displays the value and size of the symbol in octal instead of decimal.
-P Display information in a standard portable output format:
Library/Object Name name   type   value   size

This format displays numeric values in hexadecimal notation unless you specify a different format with the-T, D, or-o flags.

If you specify the-a flag-p flag, only the Library/object Name field is displayed. Similarly, the-P flag displays only the symbol size fields that are appropriate for the size.

-P Not sorted. The output is displayed in symbol table order.
-R Reverse order.
-T Format Displays the numeric value in the specified format, where the format parameter is one of the following symbolic representations: D decimal notation notation. This is the default format for the NM command. o octal symbolic notation. x hexadecimal notation.
-T Truncate each name of the column that might overflow it, so that the last character of the displayed name is an asterisk. By default, NM displays the full name of the listed symbol, and a name that is longer than the width of the column set for it causes each column to be unable to be aligned after the name.
-U Only undefined symbols are displayed.
-V Sort output by value rather than alphabetically.
-X Displays the value and size of a symbol in hexadecimal instead of a decimal number.
-X Mode Specifies the type of object file that NM should check. Mode must be one of the following: 32 handle only 32-bit object file 64 handle 64-bit object file 32_64 processing 32-bit and 64-bit object Files D64 quarantine stop 64-bit Xcoff files (magic number = = U803xtocmagic )。 Any <

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.