com32: fix __farcall()
authorH. Peter Anvin <hpa@zytor.com>
Tue, 14 Aug 2007 22:19:32 +0000 (15:19 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 14 Aug 2007 22:19:32 +0000 (15:19 -0700)
The address for the farcall thunk was inadvertently clobbered in entry.S.

com32/lib/sys/entry.S

index 4df2f06..be42c8b 100644 (file)
@@ -49,12 +49,13 @@ _start:
                # Copy COM32 invocation parameters
                leal 4(%esp),%esi               # Argument list
                movl $__com32,%edi
-               movl $6,%ecx
+               movl $5,%ecx
                movl %esp,-4(%edi)              # Save the initial stack ptr
                cmpl (%esi),%ecx
                jbe 1f
                movl (%esi),%ecx
-1:             rep ; movsl
+1:             inc %ecx                        # Copy the argument count, too
+               rep ; movsl
 
                # Parse the command line (assumes REGPARM)
                movl __com32+4,%edx             # Command line