summary refs log tree commit diff
path: root/sysdeps/i386/elf
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/elf')
-rw-r--r--sysdeps/i386/elf/start.S10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/i386/elf/start.S b/sysdeps/i386/elf/start.S
index 5c29ce412a..67d7916ad6 100644
--- a/sysdeps/i386/elf/start.S
+++ b/sysdeps/i386/elf/start.S
@@ -49,8 +49,8 @@ _start:
 	   linked, this will not be set by anything to any function
 	   pointer; hopefully it will be zero so we don't try to call
 	   random pointers.  */
-	testl %edx
-	jeq nofini
+	testl %edx,%edx
+	jz nofini
 	pushl %edx
 	call atexit
 	addl $4, %esp
@@ -84,3 +84,9 @@ nofini:
 	pushl %eax
 	call exit		/* This should never return.  */
 	hlt			/* Crash if somehow it does return.  */
+
+/* Define a symbol for the first piece of initialized data.  */
+	.data
+	.globl __data_start
+__data_start:
+	.long 0