2026-09-19 23:49:27 +02:00
|
|
|
.TH GASM-DIS 1 "2026-09-19" "gasm" "User Commands"
|
2026-09-19 21:18:43 +02:00
|
|
|
.SH NAME
|
|
|
|
|
gasm-dis \- disassemble machine code to instruction text
|
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
.B gasm dis [\-a arch] <file>
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
Disassemble machine code to instruction text, decoded through
|
|
|
|
|
golang.org/x/arch.
|
|
|
|
|
.PP
|
|
|
|
|
With a
|
|
|
|
|
.I .s
|
|
|
|
|
file, the file is assembled first and the listing follows the real
|
|
|
|
|
layout: one block per TEXT function, local labels printed at their
|
|
|
|
|
offsets. The architecture comes from the file-name suffix, or from
|
|
|
|
|
.BR \-a .
|
|
|
|
|
.PP
|
|
|
|
|
With any other file, or
|
|
|
|
|
.B \-
|
|
|
|
|
for standard input, the bytes are disassembled linearly and
|
|
|
|
|
.B \-a
|
|
|
|
|
selects the architecture (amd64, arm64, riscv64 or loong64).
|
|
|
|
|
.SH OPTIONS
|
|
|
|
|
.TP
|
|
|
|
|
.B \-a \fIarch\fR
|
|
|
|
|
Architecture for raw input: amd64, arm64, riscv64 or loong64.
|
|
|
|
|
.SH EXIT STATUS
|
|
|
|
|
Exits 0 on success, 1 when assembly or decoding fails, and 2 on a usage
|
|
|
|
|
error.
|
|
|
|
|
.SH EXAMPLES
|
|
|
|
|
.nf
|
2026-09-20 01:40:51 +02:00
|
|
|
gasm dis k_amd64.s assemble, then list each function
|
2026-09-19 21:18:43 +02:00
|
|
|
gasm dis \-a amd64 \- < dump.bin disassemble raw bytes from stdin
|
|
|
|
|
.fi
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
.BR gasm (1),
|
|
|
|
|
.BR gasm\-asm (1)
|