pub struct RelocationBlock<'a> {
pub rva: u32,
pub size: u32,
pub bytes: &'a [u8],
}Expand description
Represents a PE (Portable Executable) base relocation block.
In the PE format, base relocations are organized into blocks, where each block corresponds to a contiguous range of memory that needs to be relocated. The relocations within a block specify offsets relative to the block’s starting address.
Unlike COFF (Common Object File Format), PE base relocations are separated by blocks.
Each block begins with a RelocationBlock structure that provides information about the
relocation block, including its starting RVA (Relative Virtual Address) and size in bytes.
Each block ends with an “absolute” relocation entry, which acts as a marker to indicate the end of the block. This entry has no actual relocation effect.
Fields§
§rva: u32The starting RVA for the relocation block.
size: u32The total size of the relocation block, in bytes.
bytes: &'a [u8]The bytes of RelocationWord data within this block.
Implementations§
Source§impl RelocationBlock<'_>
impl RelocationBlock<'_>
Sourcepub fn words(&self) -> RelocationWordIterator<'_> ⓘ
pub fn words(&self) -> RelocationWordIterator<'_> ⓘ
Returns iterator for RelocationWord
Trait Implementations§
Source§impl<'a> Clone for RelocationBlock<'a>
impl<'a> Clone for RelocationBlock<'a>
Source§fn clone(&self) -> RelocationBlock<'a>
fn clone(&self) -> RelocationBlock<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for RelocationBlock<'a>
Source§impl<'a> Debug for RelocationBlock<'a>
impl<'a> Debug for RelocationBlock<'a>
Source§impl<'a> Default for RelocationBlock<'a>
impl<'a> Default for RelocationBlock<'a>
Source§fn default() -> RelocationBlock<'a>
fn default() -> RelocationBlock<'a>
Source§impl<'a> PartialEq for RelocationBlock<'a>
impl<'a> PartialEq for RelocationBlock<'a>
Source§fn eq(&self, other: &RelocationBlock<'a>) -> bool
fn eq(&self, other: &RelocationBlock<'a>) -> bool
self and other values to be equal, and is used by ==.