diff --git a/cranelift/module/src/backend.rs b/cranelift/module/src/backend.rs index 74b2342e13..bf4f593a42 100644 --- a/cranelift/module/src/backend.rs +++ b/cranelift/module/src/backend.rs @@ -103,25 +103,6 @@ where contents: &ModuleContents, ) -> ModuleResult; - /// Write the address of `what` into the data for `data` at `offset`. `data` must refer to a - /// defined data object. - fn write_data_funcaddr( - &mut self, - data: &mut Self::CompiledData, - offset: usize, - what: ir::FuncRef, - ); - - /// Write the address of `what` plus `addend` into the data for `data` at `offset`. `data` must - /// refer to a defined data object. - fn write_data_dataaddr( - &mut self, - data: &mut Self::CompiledData, - offset: usize, - what: ir::GlobalValue, - addend: binemit::Addend, - ); - /// Perform all outstanding relocations on the given function. This requires all `Local` /// and `Export` entities referenced to be defined. /// diff --git a/cranelift/module/src/module.rs b/cranelift/module/src/module.rs index 18e1dc7347..600cff9ec8 100644 --- a/cranelift/module/src/module.rs +++ b/cranelift/module/src/module.rs @@ -639,49 +639,6 @@ where Ok(()) } - /// Write the address of `what` into the data for `data` at `offset`. `data` must refer to a - /// defined data object. - pub fn write_data_funcaddr(&mut self, data: DataId, offset: usize, what: ir::FuncRef) { - let info = &mut self.contents.data_objects[data]; - debug_assert!( - info.decl.linkage.is_definable(), - "imported data cannot contain references" - ); - self.backend.write_data_funcaddr( - &mut info - .compiled - .as_mut() - .expect("`data` must refer to a defined data object"), - offset, - what, - ); - } - - /// Write the address of `what` plus `addend` into the data for `data` at `offset`. `data` must - /// refer to a defined data object. - pub fn write_data_dataaddr( - &mut self, - data: DataId, - offset: usize, - what: ir::GlobalValue, - addend: binemit::Addend, - ) { - let info = &mut self.contents.data_objects[data]; - debug_assert!( - info.decl.linkage.is_definable(), - "imported data cannot contain references" - ); - self.backend.write_data_dataaddr( - &mut info - .compiled - .as_mut() - .expect("`data` must refer to a defined data object"), - offset, - what, - addend, - ); - } - /// Return the target isa pub fn isa(&self) -> &dyn isa::TargetIsa { self.backend.isa() diff --git a/cranelift/object/src/backend.rs b/cranelift/object/src/backend.rs index 15ba44be7d..2177f81c27 100644 --- a/cranelift/object/src/backend.rs +++ b/cranelift/object/src/backend.rs @@ -6,7 +6,7 @@ use cranelift_codegen::binemit::{ }; use cranelift_codegen::entity::SecondaryMap; use cranelift_codegen::isa::TargetIsa; -use cranelift_codegen::{self, binemit, ir}; +use cranelift_codegen::{self, ir}; use cranelift_module::{ Backend, DataContext, DataDescription, DataId, FuncId, FuncOrDataId, Init, Linkage, ModuleContents, ModuleError, ModuleResult, @@ -400,25 +400,6 @@ impl Backend for ObjectBackend { Ok(ObjectCompiledData) } - fn write_data_funcaddr( - &mut self, - _data: &mut ObjectCompiledData, - _offset: usize, - _what: ir::FuncRef, - ) { - unimplemented!() - } - - fn write_data_dataaddr( - &mut self, - _data: &mut ObjectCompiledData, - _offset: usize, - _what: ir::GlobalValue, - _usize: binemit::Addend, - ) { - unimplemented!() - } - fn finalize_function( &mut self, _id: FuncId, diff --git a/cranelift/simplejit/src/backend.rs b/cranelift/simplejit/src/backend.rs index c78c283564..222cb81494 100644 --- a/cranelift/simplejit/src/backend.rs +++ b/cranelift/simplejit/src/backend.rs @@ -460,25 +460,6 @@ impl<'simple_jit_backend> Backend for SimpleJITBackend { }) } - fn write_data_funcaddr( - &mut self, - _data: &mut Self::CompiledData, - _offset: usize, - _what: ir::FuncRef, - ) { - unimplemented!(); - } - - fn write_data_dataaddr( - &mut self, - _data: &mut Self::CompiledData, - _offset: usize, - _what: ir::GlobalValue, - _usize: Addend, - ) { - unimplemented!(); - } - fn finalize_function( &mut self, _id: FuncId,