diff --git a/Lib/LLVMJIT/EmitModule.cpp b/Lib/LLVMJIT/EmitModule.cpp index cf930e01d..2bc215229 100644 --- a/Lib/LLVMJIT/EmitModule.cpp +++ b/Lib/LLVMJIT/EmitModule.cpp @@ -255,7 +255,7 @@ void LLVMJIT::emitModule(const IR::Module& irModule, asLLVMType(llvmContext, functionType), llvm::Function::ExternalLinkage, functionIndex >= irModule.functions.imports.size() - ? names.functions[functionIndex].name /* getExternalName("functionDef", functionIndex - irModule.functions.imports.size()) */ + ? std::string("wasm::") + names.functions[functionIndex].name /* getExternalName("functionDef", functionIndex - irModule.functions.imports.size()) */ : getExternalName("functionImport", functionIndex), &outLLVMModule); function->setCallingConv(asLLVMCallingConv(functionType.callingConvention())); diff --git a/Lib/LLVMJIT/LLVMJIT.cpp b/Lib/LLVMJIT/LLVMJIT.cpp index 789bfaee0..2c96481c0 100644 --- a/Lib/LLVMJIT/LLVMJIT.cpp +++ b/Lib/LLVMJIT/LLVMJIT.cpp @@ -53,6 +53,7 @@ namespace LLVMRuntimeSymbols { static HashMap map = { {"memmove", (void*)&memmove}, {"memset", (void*)&memset}, + {"memcpy", (void*)&memcpy}, #ifdef _WIN32 {"__chkstk", (void*)&__chkstk}, {"__CxxFrameHandler3", (void*)&__CxxFrameHandler3},