CorExitProcess for armcc_41_1440 (#44)

* Implement CorExitProcess for armcc_41_1440

* Fix function signature, add dll coverage
This commit is contained in:
Ethan Roseman 2023-09-12 22:44:56 +09:00 committed by GitHub
parent d27fc944bd
commit 6a420668e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 1 deletions

View File

@ -20,12 +20,13 @@ add_executable(wibo
dll/crt.cpp
dll/kernel32.cpp
dll/lmgr.cpp
dll/mscoree.cpp
dll/msvcrt.cpp
dll/ntdll.cpp
dll/ole32.cpp
dll/user32.cpp
dll/vcruntime.cpp
dll/version.cpp
dll/msvcrt.cpp
files.cpp
handles.cpp
loader.cpp

23
dll/mscoree.cpp Normal file
View File

@ -0,0 +1,23 @@
#include "common.h"
namespace mscoree {
void WIN_FUNC CorExitProcess(int exitCode) {
exit(exitCode);
}
}
static void *resolveByName(const char *name) {
if (strcmp(name, "CorExitProcess") == 0) return (void *) mscoree::CorExitProcess;
return nullptr;
}
wibo::Module lib_mscoree = {
(const char *[]){
"mscoree",
"mscoree.dll",
nullptr,
},
resolveByName,
nullptr,
};

View File

@ -27,8 +27,12 @@ static void *resolveByName(const char *name) {
wibo::Module lib_msvcrt = {
(const char *[]){
"msvcrt",
"msvcrt.dll",
"msvcrt40",
"msvcrt40.dll",
"msvcr70",
"msvcr70.dll",
nullptr,
},
resolveByName,

View File

@ -77,6 +77,7 @@ extern const wibo::Module lib_bcrypt;
extern const wibo::Module lib_crt;
extern const wibo::Module lib_kernel32;
extern const wibo::Module lib_lmgr;
extern const wibo::Module lib_mscoree;
extern const wibo::Module lib_msvcrt;
extern const wibo::Module lib_ntdll;
extern const wibo::Module lib_ole32;
@ -89,6 +90,7 @@ const wibo::Module * wibo::modules[] = {
&lib_crt,
&lib_kernel32,
&lib_lmgr,
&lib_mscoree,
&lib_msvcrt,
&lib_ntdll,
&lib_ole32,