aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Lohoff <flo@rfc822.org>2008-11-29 21:47:46 +0000
committerGuido G√ľnther <agx@sigxcpu.org>2009-01-11 18:20:25 +0100
commit857d3397015f6b84c92207fe023a049faad59776 (patch)
tree2e9f8e3b443a694f27c019d3360600977ae54a8c
parent9b278b0264d12e3a9c2b5468fd3333fad1fb45f5 (diff)
Explicitly give in the args of the start64 asm stub
otherwise newer compilers optimize away the usage and there is a crash on start of the kernel and/or no kernel command line args.
-rw-r--r--ext2load/loader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext2load/loader.c b/ext2load/loader.c
index 0d87846..2b1192f 100644
--- a/ext2load/loader.c
+++ b/ext2load/loader.c
@@ -521,10 +521,12 @@ void _start64(LONG argc, CHAR * argv[], CHAR * envp[],
"\t.set mips3\n"
"\t.set noreorder\n"
"\t.set noat\n"
- "\tld $1, 0($7)\n"
+ "\tld $1, 0(%0)\n"
+ "\tmove $4, %1\n"
+ "\tmove $5, %2\n"
"\tjr $1\n"
"\t nop\n"
- "\t.set pop");
+ "\t.set pop": : "r" (addr), "r" (argc), "r" (argv) : "$4", "$5");
}
void _start(LONG argc, CHAR *argv[], CHAR *envp[])