about summary refs log tree commit diff
path: root/sysdeps/i386/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/dl-machine.h')
-rw-r--r--sysdeps/i386/dl-machine.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 753f12678f..5220d923b7 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -220,25 +220,24 @@ _dl_start_user:\n\
 	movl _dl_skip_args@GOT(%ebx), %eax\n\
 	movl (%eax), %eax\n\
 	# Pop the original argument count.\n\
-	popl %esi\n\
+	popl %edx\n\
 	# Adjust the stack pointer to skip _dl_skip_args words.\n\
 	leal (%esp,%eax,4), %esp\n\
 	# Subtract _dl_skip_args from argc.\n\
-	subl %eax, %esi\n\
+	subl %eax, %edx\n\
 	# Push argc back on the stack.\n\
-	push %esi\n\
+	push %edx\n\
 	# The special initializer gets called with the stack just\n\
 	# as the application's entry point will see it; it can\n\
 	# switch stacks if it moves these contents over.\n\
 " RTLD_START_SPECIAL_INIT "\n\
 	# Load the parameters again.\n\
 	# (eax, edx, ecx, *--esp) = (_dl_loaded, argc, argv, envp)\n\
-	leal 8(%esp,%esi,4), %edx\n\
+	movl _dl_loaded@GOT(%ebx), %esi\n\
+	leal 8(%esp,%edx,4), %eax\n\
 	leal 4(%esp), %ecx\n\
-	pushl %edx\n\
-	movl %esi, %edx\n\
-	movl _dl_loaded@GOT(%ebx), %eax\n\
-	movl (%eax), %eax\n\
+	pushl %eax\n\
+	movl (%esi), %eax\n\
 	# Call the function to run the initializers.\n\
 	call _dl_init@PLT\n\
 	# Pass our finalizer function to the user in %edx, as per ELF ABI.\n\