[uClibc-cvs] svn commit: trunk/uClibc/libc/sysdeps/linux/x86_64

vapier at uclibc.org vapier at uclibc.org
Thu Jul 14 00:04:55 UTC 2005


Author: vapier
Date: 2005-07-13 18:04:54 -0600 (Wed, 13 Jul 2005)
New Revision: 10823

Log:
import the rest of the glibc start.S so PIE works

Modified:
   trunk/uClibc/libc/sysdeps/linux/x86_64/crt1.S


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/x86_64/crt1.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/x86_64/crt1.S	2005-07-13 15:02:36 UTC (rev 10822)
+++ trunk/uClibc/libc/sysdeps/linux/x86_64/crt1.S	2005-07-14 00:04:54 UTC (rev 10823)
@@ -106,27 +106,27 @@
 	   which grow downwards).  */
 	pushq %rsp
 
+#if defined(L_Scrt1)
 	/* Give address for main() */
+	movq main at GOTPCREL(%rip), %rdi
+
+	/* setup init/fini address */
+	movq _init at GOTPCREL(%rip), %rcx
+	movq _fini at GOTPCREL(%rip), %r8
+
+	/* start the fun */
+	call __uClibc_main at PLT
+#else
+	/* Give address for main() */
 	movq $main, %rdi
 
 	/* setup init/fini address */
 	movq $_init, %rcx
 	movq $_fini, %r8
 
-/**************
- * START TODO */
-#if defined(L_Scrt1)
-	call .L0
-.L0:
-	popq %rbx
-	addq $_GLOBAL_OFFSET_TABLE_+[.-.L0],%rbx
-
-	call *__uClibc_main at GOT(%rip)
-#else
+	/* start the fun */
 	call __uClibc_main
 #endif
-/* END TODO *
- ************/
 
 	hlt        /* Crash if somehow `exit' does return.  */
 .size _start,.-_start




More information about the uClibc-cvs mailing list