diff options
Diffstat (limited to 'elf/rtld.c')
-rw-r--r-- | elf/rtld.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/elf/rtld.c b/elf/rtld.c index 06b534a559..23b3462490 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1113,6 +1113,10 @@ of this helper program; chances are you did not intend to run this program.\n\ main_map->l_phnum = phnum; main_map->l_entry = *user_entry; + /* Even though the link map is not yet fully initialized we can add + it to the map list since there are no possible users running yet. */ + _dl_add_to_namespace_list (main_map, LM_ID_BASE); + /* At this point we are in a bit of trouble. We would have to fill in the values for l_dev and l_ino. But in general we do not know where the file is. We also do not handle AT_EXECFD @@ -1255,7 +1259,7 @@ of this helper program; chances are you did not intend to run this program.\n\ /* We were invoked directly, so the program might not have a PT_INTERP. */ _dl_rtld_libname.name = GL(dl_rtld_map).l_name; - /* _dl_rtld_libname.next = NULL; Already zero. */ + /* _dl_rtld_libname.next = NULL; Already zero. */ GL(dl_rtld_map).l_libname = &_dl_rtld_libname; } else @@ -1380,6 +1384,9 @@ of this helper program; chances are you did not intend to run this program.\n\ l->l_libname->name = memcpy (copy, dsoname, len); } + /* Add the vDSO to the object list. */ + _dl_add_to_namespace_list (l, LM_ID_BASE); + /* Rearrange the list so this DSO appears after rtld_map. */ assert (l->l_next == NULL); assert (l->l_prev == main_map); |