Skip to content

sorru94/disasm-util

Repository files navigation

disasm-util

disasm-util is a simple command line utility to disassemble a gcc object file and pretty print the resulting information.

Dependencies

This utility uses the objdump tool, part of the GNU Binary Utilities, to disassemble the object files. Install it with your preferred method and then add the executable path to your PATH environment variable or pass it directly to the tool.

Supported inputs

Only object files generated with gcc are supported.

Usage

The utility is provided as a rust binary crate. Building and executing the tool can be achieved by running the following from terminal:

cargo run -- [-p <OBJDUMP_PATH>, -o <FILE>] <OBJ_FILE>

This command requires rust to be installed on your system. See the rust documentation for more information.

Parsed output

By default the output is printed to stdout. To store the output to a file use the -o <FILE> option. The parsed output is in the following format:

section 1 name:
    symbol 1 name:
        opcode instruction 1
    symbol 2 name:
        opcode instruction 2
        opcode instruction 3
        opcode instruction 4
section 2 name:
    symbol 3 name:
        opcode instruction 5
        opcode instruction 6

Sections and symbols are alphabetically sorted.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages