[uClibc] (no subject)

Peter S. Mazinger ps.m at gmx.net
Tue Nov 4 23:46:14 UTC 2003


Hello!

Could someone with assembler knowledge comment on the attached diffs? They 
are made using gcc-3.3.2 and diffed between glibc-2.2.5(also 2.3.1, 
not 2.3.2) and uClibc (cvs latest) generated crti.S and crtn.S (for i386)
How could the uClibc version be made "compatible/closer" to the glibc 
generated ones (w/o __gmon_start__)?
The included defs.h is:

#define END_INIT
#define END_FINI
#define ALIGN
#include <libc-symbols.h>
weak_extern (__gmon_start__)

Peter

-- 
Peter S. Mazinger <ps.m at gmx.net>   ID: 0xA5F059F2    NIC: IXUYHSKQLI
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2

____________________________________________________________________
Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
-------------- next part --------------
--- /opt/test/glibc-2.2.5/build-dir/csu/crtn.S	Tue Nov  4 10:27:35 2003
+++ crtn.S	Tue Nov  4 22:56:37 2003
@@ -1,29 +1,27 @@
 	.file	"initfini.c"
 #APP
 	
-#include "defs.h"
-	
-/*@HEADER_ENDS*/
-/*@_init_EPILOG_BEGINS*/
 	.section .init
 #NO_APP
-	leave
+.globl _init
+	.type	_init, @function
+#NO_APP
+	popl	%ebx
+	popl	%ebp
 	ret
+	.size	_init, .-_init
 #APP
-	END_INIT
 	
-/*@_init_EPILOG_ENDS*/
-/*@_fini_EPILOG_BEGINS*/
 	.section .fini
 #NO_APP
-	movl	-4(%ebp), %ebx
-	leave
+.globl _fini
+	.type	_fini, @function
+#NO_APP
+	popl	%ebx
+	popl	%ebp
 	ret
+	.size	_fini, .-_fini
 #APP
-	END_FINI
 	
-/*@_fini_EPILOG_ENDS*/
-/*@TRAILER_BEGINS*/
-	.weak	__gmon_start__
 	.section	.note.GNU-stack,"", at progbits
 	.ident	"GCC: (GNU) 3.3.2 (release)"
-------------- next part --------------
--- /opt/test/glibc-2.2.5/build-dir/csu/crti.S	Tue Nov  4 10:27:35 2003
+++ crti.S	Tue Nov  4 22:56:37 2003
@@ -1,67 +1,38 @@
 	.file	"initfini.c"
 #APP
 	
-#include "defs.h"
-	
-/*@HEADER_ENDS*/
-/*@_init_PROLOG_BEGINS*/
-#NO_APP
-	.p2align 2,,3
-	.type	call_gmon_start, @function
-call_gmon_start:
-	pushl	%ebp
-	movl	%esp, %ebp
-	pushl	%ebx
-	call	.L5
-.L5:
-	popl	%ebx
-	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L5], %ebx
-	pushl	%eax
-	movl	__gmon_start__ at GOT(%ebx), %eax
-	testl	%eax, %eax
-	je	.L3
-	call	*%eax
-.L3:
-	movl	-4(%ebp), %ebx
-	leave
-	ret
-#APP
 	.section .init
 #NO_APP
-	.p2align 2,,3
 .globl _init
 	.type	_init, @function
 _init:
 	pushl	%ebp
 	movl	%esp, %ebp
-	subl	$8, %esp
-	call	call_gmon_start
+	pushl	%ebx
+	call	.L4
+.L4:
+	popl	%ebx
+	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L4], %ebx
 #APP
-	ALIGN
-	END_INIT
 	
-/*@_init_PROLOG_ENDS*/
-/*@_fini_PROLOG_BEGINS*/
+	
+	
+	
 	.section .fini
 #NO_APP
-	.p2align 2,,3
 .globl _fini
 	.type	_fini, @function
 _fini:
 	pushl	%ebp
 	movl	%esp, %ebp
 	pushl	%ebx
-	call	.L8
-.L8:
+	call	.L6
+.L6:
 	popl	%ebx
-	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L8], %ebx
-	pushl	%edx
+	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L6], %ebx
 #APP
-	ALIGN
-	END_FINI
 	
-/*@_fini_PROLOG_ENDS*/
-/*@TRAILER_BEGINS*/
-	.weak	__gmon_start__
+	
+	
 	.section	.note.GNU-stack,"", at progbits
 	.ident	"GCC: (GNU) 3.3.2 (release)"


More information about the uClibc mailing list