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: RelocLengthr_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

size in bytes

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.