Remove reloc_constant
It is no longer used by the new backends
This commit is contained in:
@@ -643,16 +643,6 @@ impl binemit::RelocSink for RelocSink {
|
||||
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.
|
||||
}
|
||||
}
|
||||
|
||||
impl RelocSink {
|
||||
@@ -764,12 +754,4 @@ impl binemit::RelocSink for TrampolineRelocSink {
|
||||
addend,
|
||||
});
|
||||
}
|
||||
fn reloc_constant(
|
||||
&mut self,
|
||||
_code_offset: binemit::CodeOffset,
|
||||
_reloc: binemit::Reloc,
|
||||
_constant_offset: ir::ConstantOffset,
|
||||
) {
|
||||
panic!("trampoline compilation should not produce constant relocs");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,16 +310,6 @@ impl<'a> ObjectBuilder<'a> {
|
||||
Reloc::Abs4 => (RelocationKind::Absolute, RelocationEncoding::Generic, 32),
|
||||
Reloc::Abs8 => (RelocationKind::Absolute, RelocationEncoding::Generic, 64),
|
||||
|
||||
// This is emitted by the old x86 backend and is only present
|
||||
// for when the constant rodata is separated from the code
|
||||
// itself. We don't do that, though, so we ignore these
|
||||
// relocations since the offsets already listed here are already
|
||||
// correct.
|
||||
//
|
||||
// FIXME(#3009): when the old backend is removed delete this
|
||||
// case.
|
||||
Reloc::X86PCRelRodata4 => continue,
|
||||
|
||||
other => unimplemented!("Unimplemented relocation {:?}", other),
|
||||
};
|
||||
self.obj
|
||||
|
||||
Reference in New Issue
Block a user