Skip to content

Commit

Permalink
Library init passes the library module handle on the stack, as it sho…
Browse files Browse the repository at this point in the history
…uld.
  • Loading branch information
icculus committed Oct 16, 2016
1 parent af2e92f commit d8f6285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lx_loader.c
Expand Up @@ -494,7 +494,7 @@ static void runLxLibraryInitOrTerm(LxModule *lxmod, const int isTermination)
"movl %%esi,%%esp \n\t" // use the OS/2 process's stack.
"pushl %%ecx \n\t" // save original stack pointer for real.
"pushl %%eax \n\t" // isTermination
"pushl $0 \n\t" // library module handle !!! FIXME
"pushl %%edx \n\t" // library module handle
"leal 1f,%%eax \n\t" // address that entry point should return to.
"pushl %%eax \n\t"
"pushl %%edi \n\t" // the OS/2 library entry point (we'll "ret" to it instead of jmp, so stack and registers are all correct).
Expand All @@ -513,7 +513,7 @@ static void runLxLibraryInitOrTerm(LxModule *lxmod, const int isTermination)
"popfl \n\t" // restore our original flags.
"popal \n\t" // restore our original registers.
: // no outputs
: "a" (isTermination), "S" (stack), "D" (lxmod->eip)
: "a" (isTermination), "d" (lxmod), "S" (stack), "D" (lxmod->eip)
: "memory"
);

Expand Down

0 comments on commit d8f6285

Please sign in to comment.