NAME
aed —
anton's encoder decoder
SYNOPSIS
aed |
-d [-136S]
[-c cpu]
[-M disassembler]
[-s symbol]
[path] |
aed |
-l |
DESCRIPTION
The aed utility decodes the x86
instruction set architecture. By default, input is read from standard input.
The following file formats are recognized:
- ELF executable binary format.
- Hexadecimal format in which instruction opcodes may be separated by spaces, commas and newlines.
- Binary format, as in raw instruction opcodes.
The options are as follows:
-1- Disassemble in 16-bit mode.
-3- Disassemble in 32-bit mode.
-6- Disassemble in 64-bit mode. (default)
-ccpu- Disassemble targeting cpu. See option
-lfor all available CPU types. Defaults to latest. -d- Disassemble all executable sections found in the input files.
-l- List all available CPU types.
-Mdisassembler- Disassembler options, the following values are recognized:
- encoder
- Show how to encode each disassembled instruction using the aed_x86_encoder(3) API.
- intel
- Serialize disassembled instructions using the Intel® syntax. (default)
- sdm
- Serialize disassembled instructions using the Intel® Software Development Manual (SDM) syntax.
-S- Display source code interleaved with the disassembly, implies
-d. Source code lines are prefixed with ‘;’, followed by the source code line number. The line number may be prefixed with a symbol name, indicating that corresponding line originates from an inlined symbol. All instructions following a source code line are associated with the same line, up to the next source code line.If path includes debug symbols, disassembled instructions may be suffixed with ‘#’ followed by a description of which variables in the source code the register operands represents.
-ssymbol- Only disassemble symbol.
- path
- Path to input file.
EXAMPLES
Disassemble an ELF binary:
$ aed -d `which aed`
Disassemble instructions in hexadecimal format:
$ echo 0000 0x90 | aed -d
Disassemble instructions in raw format:
$ printf '\x00\x00\x90' | aed -d
DIAGNOSTICS
The aed utility exits 0 on success,
and >0 if an error occurs.
AUTHORS
Anton Lindqvist <anton@basename.se>