Program disassembly for the Linux drive series

Source: Internet
Author: User

Excerpt page: http://www.169it.com/article/330129798173630299.html

Reference page: http://www.cppblog.com/liu1061/articles/53762.html

Examples of common uses of OBJDUMP commands in Linux:

Objdump-x obj: The data of the target file is composed in the form of a sort of information output;< all dynamic libraries that can be found in the file >

Objdump-t obj: Symbol table for Output destination file ()

Objdump-h obj: Summary of all segments of the output destination file ()

Objdump-j./text/.data-s obj: Output information for the specified segment (Disassembly source code)

Objdump-s obj: The symbol table for the output destination file () prints more clearly when gcc-g

Objdump-j. TEXT-SL Stack1 | More

-S to disassemble the source code as much as possible, especially when you specify the debug parameter of-G when compiling,

The effect is more obvious. The-d parameter is implied.

-l labels the corresponding target code with the file name and line number, only with-D,-D, or-R

The difference between using-LD and using-D is not very large, useful when debugging at the source level, requiring

Debug compilation options such as-G are used at compile time.

-j Name displays only the information for the specified section

How do I disassemble any binary file using the Linux objdump command ?

You can use the following command:

Objdump-d-B binary-m i386 A.bin

-d means disassembly of all files,-B for Binary,-m for instruction set schema, A.bin is the binary we want to disassemble

Objdump-m can view more supported instruction set schemas, such as i386:x86-64,i8086, etc.

The parameters of all Objdump commands above also apply to Arm-linux-objdump.

At the same time we can specify Big-endian or Little-endian (-eb or-el), we can specify from a location to start disassembly and so on.

The objdump command is a command to disassemble a target file or executable file under Linux, and it has other functions, as an example of the ELF format executable test in detail:

Objdump-f Test Displays the file header information for test

Those sections in objdump-d test disassembly test that require execution of instructions

Objdump-d test is similar to-D, but all sections in the Disassembly test

Objdump-h Test Displays section header information for test

Objdump-x Test Displays all header information for test

Objdump-s Test Displays all header information for test, as well as their hexadecimal file code

Program disassembly for the Linux drive series

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.