scc-patches

scc patches
Log | Files | Refs | README

0010-lib-c-Update-crt-posix.s-for-i386-linux.patch (852B)


      1 From 23db947ac18d9b19329400985605b180041f00bd Mon Sep 17 00:00:00 2001
      2 From: zerous Naveen Narayanan <zerous@nocebo.space>
      3 Date: Fri, 1 Nov 2019 20:46:51 +0100
      4 Subject: [PATCH 10/11] [lib/c] Update crt-posix.s for i386/linux
      5 
      6 ---
      7  src/libc/arch/i386/crt-posix.s | 11 +++++++----
      8  1 file changed, 7 insertions(+), 4 deletions(-)
      9 
     10 diff --git a/src/libc/arch/i386/crt-posix.s b/src/libc/arch/i386/crt-posix.s
     11 index 88013697..ca0c7f1e 100644
     12 --- a/src/libc/arch/i386/crt-posix.s
     13 +++ b/src/libc/arch/i386/crt-posix.s
     14 @@ -2,16 +2,19 @@
     15  	.globl	_environ
     16  _environ:
     17  	.long	0
     18 -
     19 +	
     20  	.text
     21 -	.global	start
     22 +	.globl	_start
     23  _start:
     24  	movl	%esp,%ebp
     25  
     26 -	movl	(%ebp),%edi
     27 -	leal	8(%ebp),%esi
     28  	leal	16(%ebp,%edi,8),%edx
     29  	movl	%edx,_environ
     30 +	pushl	%edx
     31 +	leal	8(%ebp),%esi
     32 +	pushl	%esi
     33 +	movl	(%ebp),%edi
     34 +	pushl	%edi
     35  
     36  	call 	main
     37  	movl	%eax,%edi
     38 -- 
     39 2.23.0
     40