(_dl_map_from_fd): If DF_1_INITFIRST flag is set remember object in
authordrepper <drepper>
Fri, 2 Feb 2001 06:18:01 +0000 (06:18 +0000)
committerdrepper <drepper>
Fri, 2 Feb 2001 06:18:01 +0000 (06:18 +0000)
_dl_initfirst.

elf/dl-load.c

index e8112b1..157d827 100644 (file)
@@ -117,6 +117,9 @@ int _dl_clktck;
 extern const char *_dl_platform;
 extern size_t _dl_platformlen;
 
+/* The object to be initialized first.  */
+struct link_map *_dl_initfirst;
+
 /* This is the decomposed LD_LIBRARY_PATH search path.  */
 static struct r_search_path_struct env_path_list;
 
@@ -1150,6 +1153,10 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
       l->l_scope[0] = &l->l_symbolic_searchlist;
     }
 
+  /* Remember whether this object must be initialized first.  */
+  if (l->l_flags_1 & DF_1_INITFIRST)
+    _dl_initfirst = l;
+
   /* Finally the file information.  */
   l->l_dev = st.st_dev;
   l->l_ino = st.st_ino;