metal-objdump - metal object file dumper
metal-objdump [commands] [options]
[filenames...]
The metal-objdump utility prints the contents of object
files and final linked images named on the command line. If no file name is
specified, metal-objdump will attempt to read from
default.metallib. If - is used as a file name,
metal-objdump will process a file on its standard input stream.
At least one of the following commands are required, and some
commands can be combined with other commands:
- --dwarf=<value>
- Dump the specified DWARF debug sections. The supported values are:
frames - .debug_frame
- --help
- Display usage information and exit. Does not stack with other
commands.
- -r, --reloc
- Display the relocation entries in the file.
- -u, --unwind-info
- Display the unwind info of the input(s).
This operation is only currently supported for COFF and Mach-O
object files.
- -v, --version
- Display the version of the metal-objdump executable. Does not stack
with other commands.
- -x, --all-headers
- Display all available header information. Equivalent to specifying
--archive-headers, --file-headers, --private-headers,
--reloc, --section-headers, and --syms.
metal-objdump 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 when disassembling. Use --version
for a list of available targets.
- --debug-vars=<format>
- Print the locations (in registers or memory) of source-level variables
alongside disassembly. format may be unicode or
ascii, defaulting to unicode if omitted.
- --debug-vars-indent=<width>
- Distance to indent the source-level variable display, relative to the
start of the disassembly. Defaults to 52 characters.
- -l, --line-numbers
- When disassembling, display source line numbers. Implies
--disassemble.
- -M,
--disassembler-options=<opt1[,opt2,...]>
- Pass target-specific disassembler options. Available options:
- reg-names-std: ARM only (default). Print in ARM 's instruction set
documentation, with r13/r14/r15 replaced by sp/lr/pc.
- reg-names-raw: ARM only. Use r followed by the register
number.
- no-aliases: AArch64 and RISC-V only. Print raw instruction mnemonic
instead of pseudo instruction mnemonic.
- numeric: RISC-V only. Print raw register names instead of ABI
mnemonic. (e.g. print x1 instead of ra)
- att: x86 only (default). Print in the AT&T syntax.
- intel: x86 only. Print in the intel syntax.
- --mcpu=<cpu-name>
- Target a specific CPU type for disassembly. Specify --mcpu=help to
display available CPUs.
- --mattr=<a1,+a2,-a3,...>
- Enable/disable target-specific attributes. Specify --mattr=help to
display the available attributes.
- --no-print-imm-hex
- Do not use hex format for immediate values in disassembly output
(default).
- --prefix=<prefix>
- When disassembling with the --source option, prepend prefix
to absolute paths.
- --prefix-strip=<level>
- When disassembling with the --source option, strip out level
initial directories from absolute paths. This option has no effect without
--prefix.
- --print-imm-hex
- Use hex format when printing immediate values in disassembly output.
- -S, --source
- When disassembling, display source interleaved with the disassembly.
Implies --disassemble.
- --show-lma
- Display the LMA column when dumping ELF section headers. Defaults to off
unless any section has different VMA 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.
- --symbolize-operands
- When disassembling, symbolize a branch target operand to print a label
instead of a real address.
When printing a PC-relative global symbol reference, print it
as an offset from the leading symbol.
Only works with PowerPC objects or X86 linked images.
- Example:
- A non-symbolized branch instruction with a local target and pc-relative
memory access like
cmp eax, dword ptr [rip + 4112]
jge 0x20117e <_start+0x25>
might become
<L0>:
cmp eax, dword ptr <g>
jge <L0>
- --triple=<string>
- Target triple to disassemble for, see --version for available
targets.
- -w, --wide
- Ignored for compatibility with GNU objdump.
- --x86-asm-syntax=<style>
- Deprecated. When used with --disassemble, choose style of code to
emit from X86 backend. Supported values are:
- intel
- Intel-style assembly
The default disassembly style is att.
- @<FILE>
- Read command-line options and commands from response file
<FILE>.
- --arch=<architecture>
- Specify the architecture to disassemble. see --version for
available architectures.
- --build-table=<value>
- Display build tables. value may be metallib, module,
descriptor, object, object-index, pipeline,
hash, or all.
- --descriptor
- Dump descriptors stored in the __TEXT,__descriptor section.
- --dyld_info
- Print bind and rebase information used by dyld to resolve external
references in a final linked binary.
- --dylibs-used
- Display the shared libraries used for linked files.
- --dylib-id
- Display the shared library's ID for dylib files.
- -g
- Print line information from debug info if available.
- -m, --macho
- Use Mach-O specific object file parser. Commands and other options may
behave differently when used with --macho.
- --non-verbose
- Display the information for Mach-O objects in non-verbose or numeric
form.
- --reflection
- Dump reflection flatbuffers referenced by AIR build tables.
- --rpaths
- Display runtime search paths for the binary.
- --arch=<architecture>
- Specify the architecture to disassemble. see --version for
available architectures.
- -ml, --metallib
- Use MetalLib specific object file parser. Commands and other options may
behave differently when used with --metallib.
- --script
- Dump scripts stored in the SCRIPT_LIST section.
To report bugs, please visit
<https://developer.apple.com/bug-reporting/>.
2014-2024, The Metal Team