* ldlang.c (lang_append_dynamic_list): When appending, add all elements
authorJakub Jelinek <jakub@redhat.com>
Wed, 11 Oct 2006 14:58:19 +0000 (14:58 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 11 Oct 2006 14:58:19 +0000 (14:58 +0000)
of the dynamic list rather than just the first entry.

ld/ChangeLog
ld/ldlang.c

index 3d6d4a66c9abddb34bcc8948ecae8715baa599be..d78ef41477b82339d8c97b053e9862cafde8d5a8 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-11  Jakub Jelinek  <jakub@redhat.com>
+
+       * ldlang.c (lang_append_dynamic_list): When appending, add all elements
+       of the dynamic list rather than just the first entry.
+
 2006-10-10  Bob Wilson  <bob.wilson@acm.org>
 
        * emulparams/elf32xtensa.sh (GENERATE_PIE_SCRIPT): Enable.
index 4ce3c935c178bf47a8d6784bad93feb4e4bebe95..62a4ed70415aa4b27af54c8f69d6307698c0291f 100644 (file)
@@ -6960,7 +6960,10 @@ lang_append_dynamic_list (struct bfd_elf_version_expr *dynamic)
 {
   if (link_info.dynamic)
     {
-      dynamic->next = link_info.dynamic->head.list;
+      struct bfd_elf_version_expr *tail;
+      for (tail = dynamic; tail->next != NULL; tail = tail->next)
+       ;
+      tail->next = link_info.dynamic->head.list;
       link_info.dynamic->head.list = dynamic;
     }
   else