about summary refs log tree commit diff
path: root/elf/dl-sort-maps.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-sort-maps.c')
-rw-r--r--elf/dl-sort-maps.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/elf/dl-sort-maps.c b/elf/dl-sort-maps.c
index 9e9d53ec47..96638d7ed1 100644
--- a/elf/dl-sort-maps.c
+++ b/elf/dl-sort-maps.c
@@ -140,7 +140,9 @@ static void
 dfs_traversal (struct link_map ***rpo, struct link_map *map,
 	       bool *do_reldeps)
 {
-  if (map->l_visited)
+  /* _dl_map_object_deps ignores l_faked objects when calculating the
+     number of maps before calling _dl_sort_maps, ignore them as well.  */
+  if (map->l_visited || map->l_faked)
     return;
 
   map->l_visited = 1;