about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-08-19 01:07:44 +0000
committerUlrich Drepper <drepper@redhat.com>1996-08-19 01:07:44 +0000
commit39778c6c9e6455303979aca2dc4685bf56cdc9be (patch)
tree9dcdd44d6e7df176f7724ac8ab674a82a947947c /elf/rtld.c
parente9d258b798f0c2e46433d2bd483e4fd47cc00915 (diff)
downloadglibc-39778c6c9e6455303979aca2dc4685bf56cdc9be.tar.gz
glibc-39778c6c9e6455303979aca2dc4685bf56cdc9be.tar.xz
glibc-39778c6c9e6455303979aca2dc4685bf56cdc9be.zip
update from main archive 960818 cvs/libc-960820 cvs/libc-960819
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index b8aa7311ab..9f13124207 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -42,6 +42,15 @@ int _dl_argc;
 char **_dl_argv;
 const char *_dl_rpath;
 
+/* Set nonzero during loading and initialization of executable and
+   libraries, cleared before the executable's entry point runs.  This
+   must not be initialized to nonzero, because the unused dynamic
+   linker loaded in for libc.so's "ld.so.1" dep will provide the
+   definition seen by libc.so's initializer; that value must be zero,
+   and will be since that dynamic linker's _dl_start and dl_main will
+   never be called.  */
+int _dl_starting_up;
+
 static void dl_main (const ElfW(Phdr) *phdr,
 		     ElfW(Half) phent,
 		     ElfW(Addr) *user_entry);
@@ -486,6 +495,9 @@ of this helper program; chances are you did not intend to run this program.\n",
       _dl_rtld_map.l_info[DT_INIT] = NULL;
     }
 
+  /* We finished the intialization and will start up.  */
+  _dl_starting_up = 1;
+
   /* Once we return, _dl_sysdep_start will invoke
      the DT_INIT functions and then *USER_ENTRY.  */
 }