Trait cranelift_codegen::binemit::RelocSink [−][src]
pub trait RelocSink {
fn reloc_external(
&mut self,
_: CodeOffset,
_: SourceLoc,
_: Reloc,
_: &ExternalName,
_: Addend
);
fn add_call_site(&mut self, _: Opcode, _: CodeOffset, _: SourceLoc) { ... }
}
Expand description
A trait for receiving relocations for code that is emitted directly into memory.
Required methods
fn reloc_external(
&mut self,
_: CodeOffset,
_: SourceLoc,
_: Reloc,
_: &ExternalName,
_: Addend
)
fn reloc_external(
&mut self,
_: CodeOffset,
_: SourceLoc,
_: Reloc,
_: &ExternalName,
_: Addend
)
Add a relocation referencing an external symbol at the current offset.
Provided methods
fn add_call_site(&mut self, _: Opcode, _: CodeOffset, _: SourceLoc)
fn add_call_site(&mut self, _: Opcode, _: CodeOffset, _: SourceLoc)
Track a call site whose return address is the given CodeOffset, for the given opcode. Does nothing in general, only useful for certain embedders (SpiderMonkey).