mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* elf/dl-deps.c (_dl_map_object_deps): Set MAP's mark bit before loop.
Set mark bits of deps as opened, instead of as scanned. * elf/rtld.c (dl_main): Remove _dl_rtld_map from chain unconditionally. Then if it has a nonzero l_opencount, add it back in search order. * elf/dl-load.c (_dl_map_object): Don't use _dl_loaded's DT_RPATH if it ain't got one!
This commit is contained in:
@ -38,6 +38,10 @@ _dl_map_object_deps (struct link_map *map)
|
||||
head.next = NULL;
|
||||
nlist = 1;
|
||||
|
||||
/* We use `l_reserved' as a mark bit to detect objects we have already
|
||||
put in the search list and avoid adding duplicate elements later in
|
||||
the list. */
|
||||
map->l_reserved = 1;
|
||||
|
||||
/* Process each element of the search list, loading each of its immediate
|
||||
dependencies and appending them to the list as we step through it.
|
||||
@ -47,11 +51,6 @@ _dl_map_object_deps (struct link_map *map)
|
||||
{
|
||||
struct link_map *l = scanp->map;
|
||||
|
||||
/* We use `l_reserved' as a mark bit to detect objects we have
|
||||
already put in the search list and avoid adding duplicate elements
|
||||
later in the list. */
|
||||
l->l_reserved = 1;
|
||||
|
||||
if (l->l_info[DT_NEEDED])
|
||||
{
|
||||
const char *strtab
|
||||
@ -79,6 +78,8 @@ _dl_map_object_deps (struct link_map *map)
|
||||
tailp->map = dep;
|
||||
tailp->next = NULL;
|
||||
++nlist;
|
||||
/* Set the mark bit that says it's already in the list. */
|
||||
dep->l_reserved = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user