summaryrefslogtreecommitdiff
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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 0377157bd7..2a14d73364 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -229,6 +229,18 @@ _dl_start_user:\n\
# _dl_init_next call below.\n\
movl _dl_main_searchlist@GOT(%ebx), %eax\n\
movl (%eax), %esi\n\
+ # First run the pre-initializers.\n\
+0: movl %esi,%eax\n\
+ # Call _dl_init_next to return the address of an initializer\n\
+ # function to run.\n\
+ call _dl_preinit_next@PLT\n\
+ # Check for zero return, when out of initializers.\n\
+ testl %eax, %eax\n\
+ jz 0f\n\
+ # Call the pre-initilizer.\n\
+ call *%eax\n\
+ # Loop to call _dl_preinit_next for the next initializer.\n\
+ jmp 0b\n\
0: movl %esi,%eax\n\
# Call _dl_init_next to return the address of an initializer\n\
# function to run.\n\