This commit is contained in:
bjorn3
2020-11-12 18:58:40 +01:00
parent cdbbcf7e13
commit 03c0e7e678

View File

@@ -568,7 +568,10 @@ impl<'simple_jit_backend> Module for SimpleJITModule {
unsafe { unsafe {
std::ptr::write(self.function_got_entries[id].unwrap().as_ptr(), ptr); std::ptr::write(self.function_got_entries[id].unwrap().as_ptr(), ptr);
} }
self.compiled_functions[id].as_ref().unwrap().perform_relocations( self.compiled_functions[id]
.as_ref()
.unwrap()
.perform_relocations(
|name| unreachable!("non GOT or PLT relocation in function {} to {}", id, name), |name| unreachable!("non GOT or PLT relocation in function {} to {}", id, name),
|name| self.get_got_address(name), |name| self.get_got_address(name),
|name| self.get_plt_address(name), |name| self.get_plt_address(name),
@@ -618,7 +621,10 @@ impl<'simple_jit_backend> Module for SimpleJITModule {
unsafe { unsafe {
std::ptr::write(self.function_got_entries[id].unwrap().as_ptr(), ptr); std::ptr::write(self.function_got_entries[id].unwrap().as_ptr(), ptr);
} }
self.compiled_functions[id].as_ref().unwrap().perform_relocations( self.compiled_functions[id]
.as_ref()
.unwrap()
.perform_relocations(
|name| unreachable!("non GOT or PLT relocation in function {} to {}", id, name), |name| unreachable!("non GOT or PLT relocation in function {} to {}", id, name),
|name| self.get_got_address(name), |name| self.get_got_address(name),
|name| self.get_plt_address(name), |name| self.get_plt_address(name),