Merge pull request #2865 from eggyal/expose_get_got_address

Expose new `JITModule::read_got_entry` function
This commit is contained in:
Chris Fallin
2021-05-04 11:30:52 -07:00
committed by GitHub

View File

@@ -285,6 +285,13 @@ impl JITModule {
} }
} }
/// Returns the given function's entry in the Global Offset Table.
///
/// Panics if there's no entry in the table for the given function.
pub fn read_got_entry(&self, func_id: FuncId) -> *const u8 {
unsafe { *self.function_got_entries[func_id].unwrap().as_ptr() }
}
fn get_got_address(&self, name: &ir::ExternalName) -> *const u8 { fn get_got_address(&self, name: &ir::ExternalName) -> *const u8 {
match *name { match *name {
ir::ExternalName::User { .. } => { ir::ExternalName::User { .. } => {