aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index e8112b1..157d827 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -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;