]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
ld: Fix adding to search path list.
authorUlrich Drepper <drepper@redhat.com>
Thu, 8 Jan 2009 04:39:21 +0000 (20:39 -0800)
committerUlrich Drepper <drepper@redhat.com>
Thu, 8 Jan 2009 04:39:21 +0000 (20:39 -0800)
src/ChangeLog
src/ld.c

index 2e17b5440a2992aaa0171e7bd4e067af6e76251d..f4af164b3949b0fd968e79cf9775c833d4b56b54 100644 (file)
@@ -1,3 +1,7 @@
+2009-01-07  Ulrich Drepper  <drepper@redhat.com>
+
+       * ld.c (ld_new_searchdir): Fix adding to search path list.
+
 2009-01-06  Ulrich Drepper  <drepper@redhat.com>
 
        * readelf.c: Implement call frame debug section dumping.
index 4f587fe1171c94c53cd9197ef401cfd4c1875b84..b4cc6cc746a514f8e8208568fe4765b9f1d013e9 100644 (file)
--- a/src/ld.c
+++ b/src/ld.c
@@ -1183,11 +1183,12 @@ ld_new_searchdir (const char *dir)
 
   /* Enqueue the file.  */
   if (ld_state.tailpaths == NULL)
-    ld_state.paths = ld_state.tailpaths = newpath;
+    ld_state.paths = ld_state.tailpaths = newpath->next = newpath;
   else
     {
       ld_state.tailpaths->next = newpath;
       ld_state.tailpaths = newpath;
+      newpath->next = ld_state.paths;
     }
 }