Index: libc/arch/mips32/src/entry.s
===================================================================
--- libc/arch/mips32/src/entry.s	(revision e708063fcb109c2a31c5e928ec97215959de8633)
+++ libc/arch/mips32/src/entry.s	(revision 86d05faebd6bfaa54033b77b89c83c9e349ac8bd)
@@ -28,9 +28,8 @@
 
 .text
-
-.org 0
-
 .section .init, "ax"
-.globl __start
+.global __start
+.set noreorder
+.option pic2
 
 ## User-space task entry point
@@ -39,15 +38,27 @@
 .ent __start
 __start:
-	lui $28, _gp
+	.frame $sp, 32, $31
+	.cpload $25
 	
-	# Mips o32 may store its arguments on stack, make space,
+	
+	# Mips o32 may store its arguments on stack, make space (16 bytes),
 	# so that it could work with -O0
-	addiu $sp, -16
+	# Make space additional 16 bytes for the stack frame
+
+	addiu $sp, -32
+	.cprestore 16   # Allow PIC code
 	
 	jal __main
+	nop
 	
 	jal main
+	nop
 	
 	jal __exit
+	nop
 	
 .end __start
+
+# Alignment of output section data to 0x4000
+.section .data
+.align 14
