pub struct WriterRelocate {
pub relocs: Vec<EhRelocation>,
writer: EndianVec<RunTimeEndian>,
}Expand description
A gimli [Writer] for the .eh_frame section that records the relocations
required against the function symbol, the personality routine and the LSDA.
Fields§
§relocs: Vec<EhRelocation>Relocations recorded while writing the .eh_frame section.
writer: EndianVec<RunTimeEndian>Implementations§
Source§impl WriterRelocate
impl WriterRelocate
Sourcepub const FUNCTION_SYMBOL: usize = 0
pub const FUNCTION_SYMBOL: usize = 0
Address::Symbol discriminant for the function’s own text symbol.
Sourcepub const PERSONALITY_SYMBOL: usize = 1
pub const PERSONALITY_SYMBOL: usize = 1
Address::Symbol discriminant for the exception personality routine.
Sourcepub const LSDA_SYMBOL: usize = 2
pub const LSDA_SYMBOL: usize = 2
Address::Symbol discriminant for the function’s LSDA.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Consume the writer, returning the serialized .eh_frame bytes.
fn target_for(symbol: usize) -> GimliResult<EhTarget>
Trait Implementations§
Source§impl Clone for WriterRelocate
impl Clone for WriterRelocate
Source§fn clone(&self) -> WriterRelocate
fn clone(&self) -> WriterRelocate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WriterRelocate
impl Debug for WriterRelocate
Source§impl Default for WriterRelocate
impl Default for WriterRelocate
Source§impl Writer for WriterRelocate
impl Writer for WriterRelocate
Source§fn write_at(&mut self, offset: usize, bytes: &[u8]) -> GimliResult<()>
fn write_at(&mut self, offset: usize, bytes: &[u8]) -> GimliResult<()>
Write a slice at a given offset. Read more
Source§fn write_address(&mut self, address: Address, size: u8) -> GimliResult<()>
fn write_address(&mut self, address: Address, size: u8) -> GimliResult<()>
Write an address. Read more
Source§fn write_eh_pointer(
&mut self,
address: Address,
eh_pe: DwEhPe,
size: u8,
) -> GimliResult<()>
fn write_eh_pointer( &mut self, address: Address, eh_pe: DwEhPe, size: u8, ) -> GimliResult<()>
Write an address with a
.eh_frame pointer encoding. Read moreSource§fn write_offset(
&mut self,
_val: usize,
_section: SectionId,
_size: u8,
) -> GimliResult<()>
fn write_offset( &mut self, _val: usize, _section: SectionId, _size: u8, ) -> GimliResult<()>
Write an offset that is relative to the start of the given section. Read more
Source§fn write_offset_at(
&mut self,
_offset: usize,
_val: usize,
_section: SectionId,
_size: u8,
) -> GimliResult<()>
fn write_offset_at( &mut self, _offset: usize, _val: usize, _section: SectionId, _size: u8, ) -> GimliResult<()>
Write an offset that is relative to the start of the given section. Read more
§fn write_eh_pointer_data(
&mut self,
val: u64,
format: DwEhPe,
size: u8,
) -> Result<(), Error>
fn write_eh_pointer_data( &mut self, val: u64, format: DwEhPe, size: u8, ) -> Result<(), Error>
Write a value with a
.eh_frame pointer format. Read more§fn write_reference(&mut self, _symbol: usize, _size: u8) -> Result<(), Error>
fn write_reference(&mut self, _symbol: usize, _size: u8) -> Result<(), Error>
Write a reference to a symbol. Read more
§fn write_u128(&mut self, val: u128) -> Result<(), Error>
fn write_u128(&mut self, val: u128) -> Result<(), Error>
Write a u128.
§fn write_u8_at(&mut self, offset: usize, val: u8) -> Result<(), Error>
fn write_u8_at(&mut self, offset: usize, val: u8) -> Result<(), Error>
Write a u8 at the given offset.
§fn write_u16_at(&mut self, offset: usize, val: u16) -> Result<(), Error>
fn write_u16_at(&mut self, offset: usize, val: u16) -> Result<(), Error>
Write a u16 at the given offset.
§fn write_u32_at(&mut self, offset: usize, val: u32) -> Result<(), Error>
fn write_u32_at(&mut self, offset: usize, val: u32) -> Result<(), Error>
Write a u32 at the given offset.
§fn write_u64_at(&mut self, offset: usize, val: u64) -> Result<(), Error>
fn write_u64_at(&mut self, offset: usize, val: u64) -> Result<(), Error>
Write a u64 at the given offset.
§fn write_u128_at(&mut self, offset: usize, val: u128) -> Result<(), Error>
fn write_u128_at(&mut self, offset: usize, val: u128) -> Result<(), Error>
Write a u128 at the given offset.
§fn write_udata(&mut self, val: u64, size: u8) -> Result<(), Error>
fn write_udata(&mut self, val: u64, size: u8) -> Result<(), Error>
Write unsigned data of the given size. Read more
§fn write_sdata(&mut self, val: i64, size: u8) -> Result<(), Error>
fn write_sdata(&mut self, val: i64, size: u8) -> Result<(), Error>
Write signed data of the given size. Read more
§fn write_udata_at(
&mut self,
offset: usize,
val: u64,
size: u8,
) -> Result<(), Error>
fn write_udata_at( &mut self, offset: usize, val: u64, size: u8, ) -> Result<(), Error>
Write a word of the given size at the given offset. Read more
§fn write_uleb128(&mut self, val: u64) -> Result<(), Error>
fn write_uleb128(&mut self, val: u64) -> Result<(), Error>
Write an unsigned LEB128 encoded integer.
§fn write_sleb128(&mut self, val: i64) -> Result<(), Error>
fn write_sleb128(&mut self, val: i64) -> Result<(), Error>
Write a signed LEB128 encoded integer.
§fn write_initial_length(
&mut self,
format: Format,
) -> Result<InitialLengthOffset, Error>
fn write_initial_length( &mut self, format: Format, ) -> Result<InitialLengthOffset, Error>
Write an initial length according to the given DWARF format. Read more
Auto Trait Implementations§
impl Freeze for WriterRelocate
impl RefUnwindSafe for WriterRelocate
impl Send for WriterRelocate
impl Sync for WriterRelocate
impl Unpin for WriterRelocate
impl UnwindSafe for WriterRelocate
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
Source§impl<T> Upcastable for T
impl<T> Upcastable for T
Source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
Source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref