mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-19 17:53:00 +01:00
Fix mes-libc crt1 to allow commands with greater than 255 arguments to run
Also reverse order of tcc-patched and mes-libc-patched stages.
This commit is contained in:
parent
9961c4b75f
commit
b929dc84b4
4 changed files with 36 additions and 12 deletions
|
|
@ -6,6 +6,7 @@ cd src/mes-libc
|
|||
|
||||
# Patch
|
||||
patch -Np0 -i ../../patches/mes-libc-qsort.patch
|
||||
patch -Np0 -i ../../patches/mes-libc-crt1.patch
|
||||
|
||||
# Recompile libc
|
||||
cd ../tcc-0.9.27
|
||||
|
|
|
|||
23
sysa/tcc-0.9.27/patches/mes-libc-crt1.patch
Normal file
23
sysa/tcc-0.9.27/patches/mes-libc-crt1.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Fix issue in mes-libc crt where argc was getting truncated to lower byte and
|
||||
prevented programs with more than 255 arguments from working correctly.
|
||||
|
||||
--- lib/linux/x86-mes-gcc/crt1.c
|
||||
+++ lib/linux/x86-mes-gcc/crt1.c
|
||||
@@ -48,7 +48,7 @@ _start ()
|
||||
asm (
|
||||
"mov %%ebp,%%eax\n\t"
|
||||
"add $4,%%eax\n\t"
|
||||
- "movzbl (%%eax),%%eax\n\t"
|
||||
+ "mov (%%eax),%%eax\n\t"
|
||||
"add $3,%%eax\n\t"
|
||||
"shl $2,%%eax\n\t"
|
||||
"add %%ebp,%%eax\n\t"
|
||||
@@ -64,7 +64,7 @@ _start ()
|
||||
|
||||
"mov %ebp,%eax\n\t"
|
||||
"add $4,%eax\n\t"
|
||||
- "movzbl (%eax),%eax\n\t"
|
||||
+ "mov (%eax),%eax\n\t"
|
||||
"push %eax\n\t"
|
||||
|
||||
"call main\n\t"
|
||||
Loading…
Add table
Add a link
Reference in a new issue