Add stubs for constant relocation in RelocSink
This commit is contained in:
@@ -72,6 +72,17 @@ impl binemit::RelocSink for RelocSink {
|
|||||||
addend,
|
addend,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn reloc_constant(
|
||||||
|
&mut self,
|
||||||
|
_code_offset: binemit::CodeOffset,
|
||||||
|
_reloc: binemit::Reloc,
|
||||||
|
_constant_offset: ir::ConstantOffset,
|
||||||
|
) {
|
||||||
|
// Do nothing for now: cranelift emits constant data after the function code and also emits
|
||||||
|
// function code with correct relative offsets to the constant data.
|
||||||
|
}
|
||||||
|
|
||||||
fn reloc_jt(&mut self, offset: binemit::CodeOffset, reloc: binemit::Reloc, jt: ir::JumpTable) {
|
fn reloc_jt(&mut self, offset: binemit::CodeOffset, reloc: binemit::Reloc, jt: ir::JumpTable) {
|
||||||
self.func_relocs.push(Relocation {
|
self.func_relocs.push(Relocation {
|
||||||
reloc,
|
reloc,
|
||||||
|
|||||||
@@ -330,6 +330,14 @@ impl binemit::RelocSink for RelocSink {
|
|||||||
) {
|
) {
|
||||||
panic!("trampoline compilation should not produce external symbol relocs");
|
panic!("trampoline compilation should not produce external symbol relocs");
|
||||||
}
|
}
|
||||||
|
fn reloc_constant(
|
||||||
|
&mut self,
|
||||||
|
_code_offset: binemit::CodeOffset,
|
||||||
|
_reloc: binemit::Reloc,
|
||||||
|
_constant_offset: ir::ConstantOffset,
|
||||||
|
) {
|
||||||
|
panic!("trampoline compilation should not produce constant relocs");
|
||||||
|
}
|
||||||
fn reloc_jt(
|
fn reloc_jt(
|
||||||
&mut self,
|
&mut self,
|
||||||
_offset: binemit::CodeOffset,
|
_offset: binemit::CodeOffset,
|
||||||
|
|||||||
Reference in New Issue
Block a user