pub enum Item {
Comment(String),
Function(FnDecl),
Raw {
addr: u64,
bytes: Vec<u8>,
},
Strings {
addr: u64,
strings: Vec<String>,
},
Notes {
addr: u64,
entries: Vec<NoteEntry>,
},
Section {
name: String,
addr: u64,
items: Vec<Item>,
},
JumpTable {
addr: u64,
dispatch: String,
entries: Vec<JumpTableEntry>,
},
}Expand description
An item in the file: at the top level, or nested inside an
Item::Section.
Variants§
Comment(String)
Free-floating // … line. Preserved on emit so structural
notes survive parse → re-emit.
Function(FnDecl)
A function declaration.
Raw
@raw(0x…, [bytes]) — pin a slice of bytes at a virtual address.
Used by the decompiler to fill the gaps between functions
(alignment padding) and to capture the content of non-executable
sections (.rodata, .data, etc.).
Strings
@strings(0x…, ["a", "b", …]) — a packed null-terminated
string table. Lowers to each entry’s UTF-8 bytes followed by
a single 0x00 terminator, in order. Used for ELF SHT_STRTAB
sections (.dynstr, .strtab, .shstrtab) and for any
well-known single-string sections like .interp (which is
emitted as a one-entry list).
Notes
@notes(0x…, [{ type: …, name: "…", desc: [bytes] }, …]) — an
ELF note section. Each entry has a 12-byte Elf64_Nhdr
header (name_size, desc_size, type), a name padded to a 4-byte
boundary, and a desc padded to a 4-byte boundary. Used for
SHT_NOTE sections (.note.gnu.property, .note.ABI-tag,
.note.gnu.build-id, …).
Section
@section("name", 0x…) { items… } — group items under an ELF
section. The section’s start address must equal the first
nested item’s address; items are required to cover the section
contiguously (no gaps) for lower to succeed.
JumpTable
@jump_table(0x…, dispatch="…") { case_0: label_<addr>; … } —
a structured switch jump table. Each entry names a case index
and the address it dispatches to; the dispatch string tags
the encoding kind (e.g. "gcc_pie_rel32", "msvc_va32") so
lower knows whether to emit 4-byte signed offsets relative to
the table base, absolute 32-bit VAs, or some other layout.
Replaces the @raw byte run a jump table would otherwise
occupy in .rodata, recovering the symbolic intent of the
dispatch.