Added temporary fix for stack alignment
This commit is contained in:
parent
05789d9626
commit
e9a0494aa7
@ -50,11 +50,14 @@ func (r *Result) finalize() ([]byte, []byte, dll.List) {
|
||||
final.RegisterNumber(asm.MOVE, x64.SyscallInputRegisters[1], 0)
|
||||
final.Syscall()
|
||||
case "windows":
|
||||
final.RegisterNumber(asm.SUB, x64.RSP, 8)
|
||||
final.RegisterNumber(asm.MOVE, windows.X64InputRegisters[0], 0)
|
||||
final.DLLCall("kernel32.ExitProcess")
|
||||
}
|
||||
|
||||
dlls := dll.List{}
|
||||
dlls := dll.List{
|
||||
{Name: "kernel32", Functions: []string{"ExitProcess"}},
|
||||
}
|
||||
|
||||
// This will place the main function immediately after the entry point
|
||||
// and also add everything the main function calls recursively.
|
||||
@ -80,6 +83,7 @@ func (r *Result) finalize() ([]byte, []byte, dll.List) {
|
||||
final.RegisterNumber(asm.MOVE, x64.SyscallInputRegisters[1], 1)
|
||||
final.Syscall()
|
||||
case "windows":
|
||||
final.RegisterNumber(asm.SUB, x64.RSP, 8)
|
||||
final.RegisterNumber(asm.MOVE, windows.X64InputRegisters[0], 1)
|
||||
final.Label(asm.DLLCALL, "kernel32.ExitProcess")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user