Clean up the stack after calling C functions according to the
i386 cdecl calling conventions.

Signed-off-by: Hans Ulrich Niedermann <h...@n-dimensional.de>

diff --git a/doc/boot_i386.S b/doc/boot_i386.S
index 20a600a6e..14dc14660 100644
--- a/doc/boot_i386.S
+++ b/doc/boot_i386.S
@@ -101,10 +101,12 @@ multiboot_entry:
 
        /* Now enter the C main function...  */
        call    EXT_C(cmain)
+       addl    $8, %esp
 
        /* Halt.  */
        pushl   $halt_message
        call    EXT_C(printf)
+       addl    $4, %esp
        
 loop:  hlt
        jmp     loop
-- 
2.26.2


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to