Struct mod_mgmt::RelocationEntry
pub struct RelocationEntry {
pub typ: u32,
pub addend: usize,
pub offset: usize,
}
Expand description
The information necessary to calculate and write a relocation value, based on a source section and a target section, in which a value based on the location of the source section is written somwhere in the target section.
Fields§
§typ: u32
The type of relocation calculation that is performed to connect the target section to the source section.
addend: usize
The value that is added to the source section’s address when performing the calculation of the source value that is written to the target section.
offset: usize
The offset from the starting virtual address of the target section that specifies where the relocation value should be written.
Implementations§
§impl RelocationEntry
impl RelocationEntry
pub fn from_elf_relocation(rela_entry: &Rela<u64>) -> RelocationEntry
pub fn is_absolute(&self) -> bool
pub fn is_absolute(&self) -> bool
Returns true if the relocation type results in a relocation calculation in which the source value written into the target section does NOT depend on the target section’s address itself in any way (i.e., it only depends on the source section)
Trait Implementations§
§impl Clone for RelocationEntry
impl Clone for RelocationEntry
§fn clone(&self) -> RelocationEntry
fn clone(&self) -> RelocationEntry
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for RelocationEntry
impl Debug for RelocationEntry
§impl PartialEq<RelocationEntry> for RelocationEntry
impl PartialEq<RelocationEntry> for RelocationEntry
§fn eq(&self, other: &RelocationEntry) -> bool
fn eq(&self, other: &RelocationEntry) -> bool
self
and other
values to be equal, and is used
by ==
.