Enum PhdrReloc
pub enum PhdrReloc {
AUTO,
PIE_SHIFT,
BSS_END,
BINARY_END,
SEGMENT_GAP,
EXEC_BACKWARD,
SECTIONS_SHIFT,
Unknown(u32),
}Expand description
Strategy used for relocating the PHDR table
Variants§
AUTO
Let LIEF choose the best strategy
PIE_SHIFT
Shift content after the PHDR table (PIE binaries only)
BSS_END
Relocate the PHDR after the first BSS-like segment
BINARY_END
Relocate at the end of the binary
SEGMENT_GAP
Relocate between two LOAD segments
EXEC_BACKWARD
Duplicate the ELF header and the PHDR table in a page inserted before the first LOAD segment (non-PIE executables only). The original content keeps its virtual addresses
SECTIONS_SHIFT
Grow the PHDR table by shifting known section in the first LOAD segment. Code and data keep their virtual addresses but this strategy assumes that the sections are consistent and not corrupted.
If the underlying code (or data) references the beginning of the
first segment or tricks the ELF sections, you must fallback to PIE_SHIFT.
Unknown(u32)
Trait Implementations§
impl Copy for PhdrReloc
impl Eq for PhdrReloc
impl StructuralPartialEq for PhdrReloc
Auto Trait Implementations§
impl Freeze for PhdrReloc
impl RefUnwindSafe for PhdrReloc
impl Send for PhdrReloc
impl Sync for PhdrReloc
impl Unpin for PhdrReloc
impl UnwindSafe for PhdrReloc
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