Trait dynasmrt::DynasmLabelApi [−][src]
pub trait DynasmLabelApi: DynasmApi { type Relocation; fn align(&mut self, alignment: usize); fn local_label(&mut self, name: &'static str); fn global_label(&mut self, name: &'static str); fn dynamic_label(&mut self, id: DynamicLabel); fn forward_reloc(&mut self, name: &'static str, kind: Self::Relocation); fn backward_reloc(&mut self, name: &'static str, kind: Self::Relocation); fn global_reloc(&mut self, name: &'static str, kind: Self::Relocation); fn dynamic_reloc(&mut self, id: DynamicLabel, kind: Self::Relocation); fn bare_reloc(&mut self, target: usize, kind: Self::Relocation); }
This trait extends DynasmApi to not only allow assembling, but also labels and various directives
Associated Types
type Relocation
Required Methods
fn align(&mut self, alignment: usize)
Push nops until the assembling target end is aligned to the given alignment
fn local_label(&mut self, name: &'static str)
Record the definition of a local label
fn global_label(&mut self, name: &'static str)
Record the definition of a global label
fn dynamic_label(&mut self, id: DynamicLabel)
Record the definition of a dynamic label
fn forward_reloc(&mut self, name: &'static str, kind: Self::Relocation)
Record a relocation spot for a forward reference to a local label
fn backward_reloc(&mut self, name: &'static str, kind: Self::Relocation)
Record a relocation spot for a backward reference to a local label
fn global_reloc(&mut self, name: &'static str, kind: Self::Relocation)
Record a relocation spot for a reference to a global label
fn dynamic_reloc(&mut self, id: DynamicLabel, kind: Self::Relocation)
Record a relocation spot for a reference to a dynamic label
fn bare_reloc(&mut self, target: usize, kind: Self::Relocation)
Record a relocation spot to an arbitrary target
Implementors
impl DynasmLabelApi for dynasmrt::x64::Assembler type Relocation = (u8, u8);
impl<'a, 'b> DynasmLabelApi for dynasmrt::x64::AssemblyModifier<'a, 'b> type Relocation = (u8, u8);
impl DynasmLabelApi for dynasmrt::x86::Assembler type Relocation = (u8, u8, u8);
impl<'a, 'b> DynasmLabelApi for dynasmrt::x86::AssemblyModifier<'a, 'b> type Relocation = (u8, u8, u8);