Skip to main content

NOOP_PROGRAM_ELF

Constant NOOP_PROGRAM_ELF 

Source
pub const NOOP_PROGRAM_ELF: &[u8];
Expand description

Minimal valid SBF ELF (352 bytes) — just returns SUCCESS (r0=0).

Used as a placeholder in init_programdata_account to satisfy LiteSVM’s ELF validation when bootstrapping program accounts. This gets stripped by write_program_data_account_with_offset before actual program data is written.

Layout (352 bytes): 0x000..0x040 ELF64 header (ET_DYN, EM_SBPF=0x107, SBPFv0, entry=0x78) 0x040..0x078 1× PT_LOAD program header (text at 0x78, 16 bytes, RX) 0x078..0x088 .text section: mov64 r0,0 ; exit 0x088..0x099 .shstrtab contents: “\0.text\0.shstrtab\0” 0x099..0x0A0 padding (7 bytes, align section headers to 8) 0x0A0..0x0E0 Section header [0]: SHT_NULL 0x0E0..0x120 Section header [1]: .text 0x120..0x160 Section header [2]: .shstrtab