Allow new-style export registration.

This commit is contained in:
Ben Vanik
2015-05-31 17:54:44 -07:00
parent 08770a4ec0
commit ce3359389b
10 changed files with 69 additions and 35 deletions

View File

@@ -234,8 +234,13 @@ bool XexModule::SetupLibraryImports(const xe_xex2_import_library_t* library) {
FunctionInfo::ExternHandler handler = 0;
if (kernel_export) {
handler =
(FunctionInfo::ExternHandler)kernel_export->function_data.shim;
if (kernel_export->function_data.trampoline) {
handler = (FunctionInfo::ExternHandler)
kernel_export->function_data.trampoline;
} else {
handler =
(FunctionInfo::ExternHandler)kernel_export->function_data.shim;
}
} else {
handler = UndefinedImport;
}