#[non_exhaustive]pub enum RelocationProblem {
WrongArchitecture,
OutOfSection,
Misaligned,
UnknownTarget,
InUninitializedSection,
InExecutable,
}Expand description
What is wrong with one relocation. Reported inside ModelError::Relocation.
§Examples
use object_lang::RelocationProblem;
assert_eq!(RelocationProblem::OutOfSection.to_string(), "patches bytes outside its section");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WrongArchitecture
The relocation kind belongs to another architecture.
OutOfSection
The patched bytes run past the end of the section.
Misaligned
An instruction relocation whose offset is not a multiple of 4.
UnknownTarget
The target symbol or section does not exist.
InUninitializedSection
The section is Bss: there are no bytes to patch.
InExecutable
The object is an executable, which is fully linked and carries no relocations.
Trait Implementations§
Source§impl Clone for RelocationProblem
impl Clone for RelocationProblem
impl Copy for RelocationProblem
Source§impl Debug for RelocationProblem
impl Debug for RelocationProblem
Source§impl Display for RelocationProblem
impl Display for RelocationProblem
impl Eq for RelocationProblem
Source§impl Hash for RelocationProblem
impl Hash for RelocationProblem
Source§impl PartialEq for RelocationProblem
impl PartialEq for RelocationProblem
impl StructuralPartialEq for RelocationProblem
Auto Trait Implementations§
impl Freeze for RelocationProblem
impl RefUnwindSafe for RelocationProblem
impl Send for RelocationProblem
impl Sync for RelocationProblem
impl Unpin for RelocationProblem
impl UnsafeUnpin for RelocationProblem
impl UnwindSafe for RelocationProblem
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