diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-02 14:14:17 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-02 14:14:17 +0100 |
| commit | a6143f33ce443c16a773816c2255936a39aee129 (patch) | |
| tree | 38681b32ac61dc1bba63bfd491afcc53ff455917 /src/main.c | |
| parent | 9ae5d6121295599bff75012b44adebabd0908ead (diff) | |
| download | box64-a6143f33ce443c16a773816c2255936a39aee129.tar.gz box64-a6143f33ce443c16a773816c2255936a39aee129.zip | |
More x64emu preparation
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 32e84a21..89d54a36 100755 --- a/src/main.c +++ b/src/main.c @@ -18,6 +18,7 @@ #include "custommem.h" #include "box64stack.h" #include "auxval.h" +#include "x64emu.h" box64context_t *my_context = NULL; int box64_log = LOG_NONE; @@ -819,6 +820,11 @@ int main(int argc, const char **argv, const char **env) { } // init x86_64 emu x64emu_t *emu = NewX64Emu(my_context, my_context->ep, (uintptr_t)my_context->stack, my_context->stacksz, 0); + // stack setup is much more complicated then just that! + SetupInitialStack(emu); // starting here, the argv[] don't need free anymore + SetupX64Emu(emu); + SetRAX(emu, my_context->argc); + SetRBX(emu, (uintptr_t)my_context->argv); return 0; |