13.3. tiarmobjdump - Object File Dumper

The tirmobjdump utility can be used to print the contents of object files and linker output files that are named on the tiarmobjdump command line.

13.3.1. Usage

tiarmobjdump [commands] [options] [filenames …]

  • tiarmobjdump - is the command used to invoke the object file dumper utility.

  • commands - are option-like commands that dictate the tiarmobjdump mode of operation.

  • options - affect the behavior of tiarmobjdump in a particular mode of operation.

  • filenames - identify one or more input object files. If no input file is specified, then tirmobjdump will attempt to read from a.out. If - is used as an input file name, tiarmobjdump will process a file on its standard input stream.

13.3.2. Commands

At least one of the following commands are required, and some commands can be combined with other commands:

-a, --archive-headers

Display the information contained within an archive’s headers.

-d, --disassemble

Disassemble all text sections found in the input files.

-D, --disassemble-all

Disassemble all sections found in the input files.

--disassemble-symbols=<symbol1>[,<symbol2>,...]

Disassemble only the specified <symbolN> arguments. This command will accept demangled C++ symbol names when the --demangle option is specified. Otherwise this command will accept mangled C++ symbol names. The --disassemble-symbols command implies the --disassemble command.

--dwarf=<value>

Dump the specified DWARF debug sections. The supported <value> arguments are:

  • frames - .debug_frame

-f, --file-headers

Display the contents of the overall file header.

--fault-map-section

Display the content of the fault map section.

-h, --headers, --section-headers

Display summaries of the headers for each section.

--help

Display usage information and exit. This command will prevent other commands from executing.

-p, --private-headers

Display format-specific file headers.

-r, --reloc

Display the relocation entries encoded in the input file.

-R, --dynamic-reloc

Display the dynamic relocation entries encoded in the input file.

--raw-clang-ast

Dump the raw binary contents of the clang AST section.

-s, --full-contents

Display the contents of each section.

-t, --syms

Display the symbol table.

-T, --dynamic-syms

Display the contents of the dynamic symbol table.

-u, --unwind-info

Display the unwind information associated with the input file(s).

--version

Display the version of the tiarmobjdump executable. This command will prevent other commands from executing.

-x, --all-headers

Display all available header information. Equivalent to specifying a combination of the following commands:

  • --archive-headers

  • --file-headers

  • --private-headers

  • --reloc

  • --section-headers

  • --syms

13.3.3. Options

tiarmobjdump supports the following options:

--adjust-vma=<offset>

Increase the displayed address in disassembly or section header printing by the specified <offset>.

--arch-name=<string>

Specify the target architecture with a <string> argument when disassembling. Use the --version option for a list of available targets.

-C, --demangle

Demangle C++ symbol names in the output.

--debug-vars=<format>

Print the locations (in registers or memory) of source-level variables alongside disassembly. The <format> argument may be unicode or ascii, defaulting to unicode if omitted.

--debug-vars-indent=<width>

The distance to indent the source-level variable display relative to the start of the disassembly is indicated by the value of the <width> argument. The default value for <width> is 40 characters.

-j, --section=<section1>[,<section2>,...]

Perform commands on the specified sections only.

-l, --line-numbers

When disassembling, display source line numbers. The use of this option implies the use of the --disassemble command.

-M, --disassembler-options=<opt1>[,<opt2>,...]

Pass target-specific disassembler options. Available options are reg-names-std and reg-names-raw.

--mcpu=<cpu-name>

Target a specific CPU with <cpu-name> argument for disassembly. Specify --mcpu=help to display available values for <cpu-name>.

--mattr=<attr1>,+<attr2>,-<attr3>,...

Enable/disable target-specific attributes. Specify --mattr=help to display the available attributes.

--no-leading-addr

When disassembling, do not print leading addresses.

--no-show-raw-insn

When disassembling, do not print the raw bytes of each instruction.

--prefix=<prefix>

When disassembling with the --source option, prepend <prefix> to absolute paths.

--print-imm-hex

Use hex format when printing immediate values in disassembly output.

-S, --source

When disassembling, display source interleaved with the disassembly. Use of this option implies the use of the --disassemble command.

--show-lma

Display the LMA (section load address) column when dumping ELF section headers. By default, this option is disabled unless a section has different VMA (virtual memory address) and LMAs.

--start-address=<address>

When disassembling, only disassemble from the specified <address>.

When printing relocations, only print the relocations patching offsets from at least <address>.

When printing symbols, only print symbols with a value of at least <address>.

--stop-address=<address>

When disassembling, only disassemble up to, but not including the specified <address>.

When printing relocations, only print the relocations patching offsets up to <address>.

When printing symbols, only print symbols with a value up to <address>.

--triple=<string>

Target triple to disassemble for, see description of --version option for a list of available target triple <string> values.

-z, --disassemble-zeroes

Do not skip blocks of zeroes when disassembling.

@<file>

Read command-line options and commands from specified <file>.

13.3.4. Known Issues

  • tiarmobjdump does not support processing of big-endian object files.

    As an alternative until the fix becomes available, we recommend that the tiarmdis standalone disassembler utility be used to disassemble big-endian object files. The command:

    tiarmdis file.obj file.dis
    

    Will write the disassembly output from the object file file.o to file.dis. If an output file is not specified, the disassembly output will be written to stdout.