Struct crate_metadata::RelocationEntry
source · 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§
source§impl RelocationEntry
impl RelocationEntry
pub fn from_elf_relocation(rela_entry: &Rela<u64>) -> RelocationEntry
sourcepub 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§
source§impl Clone for RelocationEntry
impl Clone for RelocationEntry
source§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 moresource§impl Debug for RelocationEntry
impl Debug for RelocationEntry
source§impl PartialEq<RelocationEntry> for RelocationEntry
impl PartialEq<RelocationEntry> for RelocationEntry
source§fn eq(&self, other: &RelocationEntry) -> bool
fn eq(&self, other: &RelocationEntry) -> bool
self
and other
values to be equal, and is used
by ==
.