pub struct Relocation { /* private fields */ }
Expand description
A relocation entry.
Returned by Object::dynamic_relocations
or ObjectSection::relocations
.
Implementations§
Source§impl Relocation
impl Relocation
Sourcepub fn kind(&self) -> RelocationKind
pub fn kind(&self) -> RelocationKind
The operation used to calculate the result of the relocation.
Sourcepub fn encoding(&self) -> RelocationEncoding
pub fn encoding(&self) -> RelocationEncoding
Information about how the result of the relocation operation is encoded in the place.
Sourcepub fn size(&self) -> u8
pub fn size(&self) -> u8
The size in bits of the place of the relocation.
If 0, then the size is determined by the relocation kind.
Sourcepub fn target(&self) -> RelocationTarget
pub fn target(&self) -> RelocationTarget
The target of the relocation.
Sourcepub fn set_addend(&mut self, addend: i64)
pub fn set_addend(&mut self, addend: i64)
Set the addend to use in the relocation calculation.
Sourcepub fn has_implicit_addend(&self) -> bool
pub fn has_implicit_addend(&self) -> bool
Returns true if there is an implicit addend stored in the data at the offset to be relocated.
Sourcepub fn flags(&self) -> RelocationFlags
pub fn flags(&self) -> RelocationFlags
Relocation flags that are specific to each file format.
The values returned by kind
, encoding
and size
are derived
from these flags.