diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-07-24 22:17:17 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-07-24 22:17:17 +0000 |
commit | e28bacf5785e4c1b3f7c6fc219163dbec9b8addb (patch) | |
tree | 1a599f39a680d70f9a13ffbaba4897ac4175d668 /sysdeps/i386/dl-machine.h | |
parent | fcf70d4114db9ff7923f5dfeb3fea6e2d623e5c2 (diff) | |
download | glibc-e28bacf5785e4c1b3f7c6fc219163dbec9b8addb.zip glibc-e28bacf5785e4c1b3f7c6fc219163dbec9b8addb.tar.gz glibc-e28bacf5785e4c1b3f7c6fc219163dbec9b8addb.tar.bz2 |
Update.
* elf/Makefile (dl-routines): Add preinit.
* elf/Versions [ld.so] (GLIBC_2.2): Export _dl_preinit_next.
* elf/link.h (struct link_map): Add new field l_preinitcount.
* elf/dl-preinit.c: New file.
* elf/dynamic-link.h: Initialize l_preinitcount.
* sysdeps/i386/dl-machine.h (RTLD_START): Call pre-init functions.
Diffstat (limited to 'sysdeps/i386/dl-machine.h')
-rw-r--r-- | sysdeps/i386/dl-machine.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index 0377157..2a14d73 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\ |