summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog4
-rw-r--r--src/ld.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2e17b544..f4af164b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/ld.c b/src/ld.c
index 4f587fe1..b4cc6cc7 100644
--- 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;
}
}