[][src]Trait dynasmrt::DynasmLabelApi

pub trait DynasmLabelApi: DynasmApi {
    type Relocation: Relocation;
    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_relocation(
        &mut self,
        name: &'static str,
        offset: isize,
        kind: Self::Relocation
    );
fn backward_relocation(
        &mut self,
        name: &'static str,
        offset: isize,
        kind: Self::Relocation
    );
fn global_relocation(
        &mut self,
        name: &'static str,
        offset: isize,
        kind: Self::Relocation
    );
fn dynamic_relocation(
        &mut self,
        id: DynamicLabel,
        offset: isize,
        kind: Self::Relocation
    );
fn bare_relocation(&mut self, target: usize, kind: Self::Relocation); fn forward_reloc(
        &mut self,
        name: &'static str,
        offset: isize,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... }
fn backward_reloc(
        &mut self,
        name: &'static str,
        offset: isize,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... }
fn global_reloc(
        &mut self,
        name: &'static str,
        offset: isize,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... }
fn dynamic_reloc(
        &mut self,
        id: DynamicLabel,
        offset: isize,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... }
fn bare_reloc(
        &mut self,
        target: usize,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... } }

This trait extends DynasmApi to not only allow assembling, but also labels and various directives

Associated Types

type Relocation: Relocation

The relocation info type this assembler uses.

Loading content...

Required methods

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_relocation(
    &mut self,
    name: &'static str,
    offset: isize,
    kind: Self::Relocation
)

Equivalent of forward_reloc, but takes a non-encoded relocation

fn backward_relocation(
    &mut self,
    name: &'static str,
    offset: isize,
    kind: Self::Relocation
)

Equivalent of backward_reloc, but takes a non-encoded relocation

fn global_relocation(
    &mut self,
    name: &'static str,
    offset: isize,
    kind: Self::Relocation
)

Equivalent of global_reloc, but takes a non-encoded relocation

fn dynamic_relocation(
    &mut self,
    id: DynamicLabel,
    offset: isize,
    kind: Self::Relocation
)

Equivalent of dynamic_reloc, but takes a non-encoded relocation

fn bare_relocation(&mut self, target: usize, kind: Self::Relocation)

Equivalent of bare_reloc, but takes a non-encoded relocation

Loading content...

Provided methods

fn forward_reloc(
    &mut self,
    name: &'static str,
    offset: isize,
    kind: <Self::Relocation as Relocation>::Encoding
)

Record a relocation spot for a forward reference to a local label

fn backward_reloc(
    &mut self,
    name: &'static str,
    offset: isize,
    kind: <Self::Relocation as Relocation>::Encoding
)

Record a relocation spot for a backward reference to a local label

fn global_reloc(
    &mut self,
    name: &'static str,
    offset: isize,
    kind: <Self::Relocation as Relocation>::Encoding
)

Record a relocation spot for a reference to a global label

fn dynamic_reloc(
    &mut self,
    id: DynamicLabel,
    offset: isize,
    kind: <Self::Relocation as Relocation>::Encoding
)

Record a relocation spot for a reference to a dynamic label

fn bare_reloc(
    &mut self,
    target: usize,
    kind: <Self::Relocation as Relocation>::Encoding
)

Record a relocation spot to an arbitrary target.

Loading content...

Implementors

impl<'a, R: Relocation> DynasmLabelApi for Modifier<'a, R>[src]

type Relocation = R

impl<R: Relocation> DynasmLabelApi for Assembler<R>[src]

type Relocation = R

impl<R: Relocation> DynasmLabelApi for VecAssembler<R>[src]

type Relocation = R

Loading content...