pub enum ElfError {
Show 23 variants
FailedToParse(String),
EntrypointOutOfBounds,
InvalidEntrypoint,
FailedToGetSection(String),
UnresolvedSymbol(String, usize, usize),
SectionNotFound(String),
RelativeJumpOutOfBounds(usize),
SymbolHashCollision(u32),
WrongEndianess,
WrongAbi,
WrongMachine,
WrongClass,
NotOneTextSection,
WritableSectionNotSupported(String),
AddressOutsideLoadableSection(u64),
InvalidVirtualAddress(u64),
UnknownRelocation(u32),
FailedToReadRelocationInfo,
WrongType,
UnknownSymbol(usize),
ValueOutOfBounds,
UnsupportedSBPFVersion,
InvalidProgramHeader,
}
Expand description
Error definitions
Variants§
FailedToParse(String)
Failed to parse ELF file
EntrypointOutOfBounds
Entrypoint out of bounds
InvalidEntrypoint
Invalid entrypoint
FailedToGetSection(String)
Failed to get section
UnresolvedSymbol(String, usize, usize)
Unresolved symbol
SectionNotFound(String)
Section not found
RelativeJumpOutOfBounds(usize)
Relative jump out of bounds
SymbolHashCollision(u32)
Symbol hash collision
WrongEndianess
Incompatible ELF: wrong endianess
WrongAbi
Incompatible ELF: wrong ABI
WrongMachine
Incompatible ELF: wrong machine
WrongClass
Incompatible ELF: wrong class
NotOneTextSection
Not one text section
WritableSectionNotSupported(String)
Read-write data not supported
AddressOutsideLoadableSection(u64)
Relocation failed, no loadable section contains virtual address
InvalidVirtualAddress(u64)
Relocation failed, invalid referenced virtual address
UnknownRelocation(u32)
Relocation failed, unknown type
FailedToReadRelocationInfo
Failed to read relocation info
WrongType
Incompatible ELF: wrong type
UnknownSymbol(usize)
Unknown symbol
ValueOutOfBounds
Offset or value is out of bounds
UnsupportedSBPFVersion
Detected sbpf_version required by the executable which are not enabled
InvalidProgramHeader
Invalid program header
Trait Implementations§
Source§impl Error for ElfError
impl Error for ElfError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ElfParserError> for ElfError
impl From<ElfParserError> for ElfError
Source§fn from(err: ElfParserError) -> Self
fn from(err: ElfParserError) -> Self
Converts to this type from the input type.
impl Eq for ElfError
impl StructuralPartialEq for ElfError
Auto Trait Implementations§
impl Freeze for ElfError
impl RefUnwindSafe for ElfError
impl Send for ElfError
impl Sync for ElfError
impl Unpin for ElfError
impl UnwindSafe for ElfError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more