pub fn from_elf(
        elf_bytes: &[u8],
        verifier: Option<Verifier<E>>,
        config: Config,
    ) -> Result<Box<Self>, EbpfError<E>> {
        let ebpf_elf = EBpfElf::load(config, elf_bytes)?;
        let (_, bytes) = ebpf_elf.get_text_bytes()?;
        if let Some(verifier) = verifier {
            verifier(bytes)?;
        }
        Ok(Box::new(ebpf_elf))
    }
/// Creates a post relocaiton/fixup executable from an ELF file
Creates a post relocaiton/fixup executable from an ELF file
Creates a post relocaiton / fixup executable from an ELF file
pub fn from_elf(
        elf_bytes: &[u8],
        verifier: Option<Verifier<E>>,
        config: Config,
    ) -> Result<Box<Self>, EbpfError<E>> {
        let ebpf_elf = EBpfElf::load(config, elf_bytes)?;
        let (_, bytes) = ebpf_elf.get_text_bytes()?;
        if let Some(verifier) = verifier {
            verifier(bytes)?;
        }
        Ok(Box::new(ebpf_elf))
    }
pub fn from_elf ( elf_bytes : & [ u8 ] , verifier : Option < Verifier < E > > , config : Config , ) -> Result < Box < Self > , EbpfError < E > > { let ebpf_elf = EBpfElf :: load ( config , elf_bytes ) ? ; let ( _ , bytes ) = ebpf_elf . get_text_bytes ( ) ? ; if let Some ( verifier ) = verifier { verifier ( bytes ) ? ; } Ok ( Box :: new ( ebpf_elf ) ) }
Creates a post relocaiton/fixup executable from an ELF file
Creates a post relocaiton / fixup executable from an ELF file
elf_bytes
&[u8]
verifier
Option<Verifier<E>>
config
Config