Trait solana_rbpf::vm::Executable [−][src]
pub trait Executable<E: UserDefinedError, I: InstructionMeter>: Send + Sync { fn get_config(&self) -> &Config; 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 register_bpf_function(&mut self, hash: u32, pc: usize); fn lookup_bpf_function(&self, hash: u32) -> Option<&usize>; fn get_syscall_registry(&self) -> &SyscallRegistry; fn set_syscall_registry(&mut self, syscall_registry: SyscallRegistry); fn get_compiled_program(&self) -> Option<&JitProgram<E, I>>; fn jit_compile(&mut self) -> Result<(), EbpfError<E>>; fn report_unresolved_symbol(
&self,
insn_offset: usize
) -> Result<u64, EbpfError<E>>; fn get_symbols(
&self
) -> (HashMap<u32, String>, HashMap<usize, (String, usize)>); }
Expand description
An relocated and ready to execute binary
Required methods
fn get_config(&self) -> &Config
[src]
fn get_config(&self) -> &Config
[src]Get the configuration settings
fn get_text_bytes(&self) -> Result<(u64, &[u8]), EbpfError<E>>
[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]
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]
fn get_entrypoint_instruction_offset(&self) -> Result<usize, EbpfError<E>>
[src]Get the entry point offset into the text section
fn register_bpf_function(&mut self, hash: u32, pc: usize)
[src]
fn register_bpf_function(&mut self, hash: u32, pc: usize)
[src]Set a symbol’s instruction offset
fn lookup_bpf_function(&self, hash: u32) -> Option<&usize>
[src]
fn lookup_bpf_function(&self, hash: u32) -> Option<&usize>
[src]Get a symbol’s instruction offset
fn get_syscall_registry(&self) -> &SyscallRegistry
[src]
fn get_syscall_registry(&self) -> &SyscallRegistry
[src]Get the syscall registry
fn set_syscall_registry(&mut self, syscall_registry: SyscallRegistry)
[src]
fn set_syscall_registry(&mut self, syscall_registry: SyscallRegistry)
[src]Set (overwrite) the syscall registry
fn get_compiled_program(&self) -> Option<&JitProgram<E, I>>
[src]
fn get_compiled_program(&self) -> Option<&JitProgram<E, I>>
[src]Get the JIT compiled program
fn jit_compile(&mut self) -> Result<(), EbpfError<E>>
[src]
fn jit_compile(&mut self) -> Result<(), EbpfError<E>>
[src]JIT compile the executable
Implementations
impl<E: UserDefinedError, I: 'static + InstructionMeter> dyn Executable<E, I>
[src]
impl<E: UserDefinedError, I: 'static + InstructionMeter> dyn Executable<E, I>
[src]Static constructors for Executable
Implementors
impl<E: UserDefinedError, I: InstructionMeter> Executable<E, I> for EBpfElf<E, I>
[src]
impl<E: UserDefinedError, I: InstructionMeter> Executable<E, I> for EBpfElf<E, I>
[src]fn get_config(&self) -> &Config
[src]
fn get_config(&self) -> &Config
[src]Get the configuration settings
fn get_text_bytes(&self) -> Result<(u64, &[u8]), EbpfError<E>>
[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]
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]
fn get_entrypoint_instruction_offset(&self) -> Result<usize, EbpfError<E>>
[src]Get the entry point offset into the text section
fn register_bpf_function(&mut self, hash: u32, pc: usize)
[src]
fn register_bpf_function(&mut self, hash: u32, pc: usize)
[src]Set a symbol’s instruction offset
fn lookup_bpf_function(&self, hash: u32) -> Option<&usize>
[src]
fn lookup_bpf_function(&self, hash: u32) -> Option<&usize>
[src]Get a symbol’s instruction offset
fn get_syscall_registry(&self) -> &SyscallRegistry
[src]
fn get_syscall_registry(&self) -> &SyscallRegistry
[src]Get the syscall registry
fn set_syscall_registry(&mut self, syscall_registry: SyscallRegistry)
[src]
fn set_syscall_registry(&mut self, syscall_registry: SyscallRegistry)
[src]Set (overwrite) the syscall registry
fn get_compiled_program(&self) -> Option<&JitProgram<E, I>>
[src]
fn get_compiled_program(&self) -> Option<&JitProgram<E, I>>
[src]Get the JIT compiled program
fn jit_compile(&mut self) -> Result<(), EbpfError<E>>
[src]
fn jit_compile(&mut self) -> Result<(), EbpfError<E>>
[src]JIT compile the executable