This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix yet another dl-deps.c issue with filters


Hi!

The new code in dl-deps.c makes wrong assumptions that map is always first
in its searchlist. This is not true with filters which appear before it.
Uli, have you looked at my 2001-09-17 dl-deps.c patch? It is needed for
filters too.

2001-09-19  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-deps.c (_dl_map_object_deps): Don't assume map has to be
	first in its searchlist.

--- libc/elf/dl-deps.c.jj	Mon Sep 17 00:21:06 2001
+++ libc/elf/dl-deps.c	Wed Sep 19 10:25:16 2001
@@ -492,13 +492,13 @@ _dl_map_object_deps (struct link_map *ma
     }
 
   /* Maybe we can remove some relocation dependencies now.  */
-  assert (map->l_searchlist.r_list[0] == map);
   for (i = 0; i < map->l_reldepsact; ++i)
     {
       unsigned int j;
 
-      for (j = 1; j < nlist; ++j)
-	if (map->l_searchlist.r_list[j] == map->l_reldeps[i])
+      for (j = 0; j < nlist; ++j)
+	if (map->l_searchlist.r_list[j] != map
+	    && map->l_searchlist.r_list[j] == map->l_reldeps[i])
 	  {
 	    /* A direct or transitive dependency is also on the list
 	       of relocation dependencies.  Remove the latter.  */

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]