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: i32In MH_OBJECT files, this is an offset from the start of the section to the item containing the address requiring relocation.
r_symbolnum: u32Indicates 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: boolIndicates 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: boolIndicates whether the r_symbolnum field is an index into the symbol table (true) or a section number (false). NOTE: externでないRelocationInfoがどういう場面で有用なのかわかっていない。
r_type: u8if not 0, machine specific relocation type
Implementations§
Source§impl 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§
Source§impl Clone for RelocationInfo
impl Clone for RelocationInfo
Source§fn clone(&self) -> RelocationInfo
fn clone(&self) -> RelocationInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more