[][src]Trait solana_rbpf::vm::Executable

pub trait Executable<E: UserDefinedError>: Send + Sync {
    fn get_text_bytes(&self) -> Result<(u64, &[u8]), EbpfError<E>>;
fn get_ro_sections(&self) -> Result<Vec<(u64, &[u8])>, EbpfError<E>>;
fn get_entrypoint_instruction_offset(&self) -> Result<usize, EbpfError<E>>;
fn lookup_bpf_call(&self, hash: u32) -> Option<&usize>;
fn report_unresolved_symbol(
        &self,
        insn_offset: usize
    ) -> Result<(), EbpfError<E>>; }

An relocated and ready to execute binary

Required methods

fn get_text_bytes(&self) -> Result<(u64, &[u8]), EbpfError<E>>

Get the .text section virtual address and bytes

fn get_ro_sections(&self) -> Result<Vec<(u64, &[u8])>, EbpfError<E>>

Get a vector of virtual addresses for each read-only section

fn get_entrypoint_instruction_offset(&self) -> Result<usize, EbpfError<E>>

Get the entry point offset into the text section

fn lookup_bpf_call(&self, hash: u32) -> Option<&usize>

Get a symbol's instruction offset

fn report_unresolved_symbol(
    &self,
    insn_offset: usize
) -> Result<(), EbpfError<E>>

Report information on a symbol that failed to be resolved

Loading content...

Implementors

impl<E: UserDefinedError> Executable<E> for EBpfElf[src]

fn get_text_bytes(&self) -> Result<(u64, &[u8]), EbpfError<E>>[src]

Get the .text section virtual address and bytes

fn get_ro_sections(&self) -> Result<Vec<(u64, &[u8])>, EbpfError<E>>[src]

Get a vector of virtual addresses for each read-only section

fn get_entrypoint_instruction_offset(&self) -> Result<usize, EbpfError<E>>[src]

Get the entry point offset into the text section

fn lookup_bpf_call(&self, hash: u32) -> Option<&usize>[src]

Get a symbol's instruction offset

fn report_unresolved_symbol(
    &self,
    insn_offset: usize
) -> Result<(), EbpfError<E>>
[src]

Report information on a symbol that failed to be resolved

Loading content...