Struct atom_macho::reloc::RelocationInfo
source · [−]pub struct RelocationInfo {
pub r_address: i32,
pub r_symbolnum: u32,
pub r_pcrel: bool,
pub r_length: RelocLength,
pub r_extern: bool,
pub r_type: u8,
}
Fields
r_address: i32
In MH_OBJECT files, this is an offset from the start of the section to the item containing the address requiring relocation.
r_symbolnum: u32
Indicates symbol index if r_extern is true or section ordinal if r_extern is false. This field is set to R_ABS for relocation entries for absolute symbols, which need no relocation.
r_pcrel: bool
Indicates whether the item containing the address to be relocated is part of a CPU instruction that uses PC-relative addressing.
For addresses contained in PC-relative instructions, the CPU adds the address of the instruction to the address contained in the instruction.
r_length: RelocLength
r_extern: bool
Indicates whether the r_symbolnum field is an index into the symbol table (true) or a section number (false). NOTE: externでないRelocationInfoがどういう場面で有用なのかわかっていない。
r_type: u8
if not 0, machine specific relocation type
Implementations
sourceimpl RelocationInfo
impl RelocationInfo
pub fn read_from_in<R: Read>(read: &mut R, endian: Endian) -> RelocationInfo
pub fn write_into(self, write: &mut impl Write)
Trait Implementations
sourceimpl Clone for RelocationInfo
impl Clone for RelocationInfo
sourcefn clone(&self) -> RelocationInfo
fn clone(&self) -> RelocationInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RelocationInfo
impl Debug for RelocationInfo
sourceimpl PartialEq<RelocationInfo> for RelocationInfo
impl PartialEq<RelocationInfo> for RelocationInfo
sourcefn eq(&self, other: &RelocationInfo) -> bool
fn eq(&self, other: &RelocationInfo) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RelocationInfo) -> bool
fn ne(&self, other: &RelocationInfo) -> bool
This method tests for !=
.
impl Copy for RelocationInfo
impl Eq for RelocationInfo
impl StructuralEq for RelocationInfo
impl StructuralPartialEq for RelocationInfo
Auto Trait Implementations
impl RefUnwindSafe for RelocationInfo
impl Send for RelocationInfo
impl Sync for RelocationInfo
impl Unpin for RelocationInfo
impl UnwindSafe for RelocationInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more