From: Jakub Jelinek Date: Wed, 11 Oct 2006 14:58:19 +0000 (+0000) Subject: * ldlang.c (lang_append_dynamic_list): When appending, add all elements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07806542d5a4e7cc5364d82f3e2fc5e23ccdd1cb;p=binutils-gdb.git * ldlang.c (lang_append_dynamic_list): When appending, add all elements of the dynamic list rather than just the first entry. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 3d6d4a66c9a..d78ef41477b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2006-10-11 Jakub Jelinek + + * 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 * emulparams/elf32xtensa.sh (GENERATE_PIE_SCRIPT): Enable. diff --git a/ld/ldlang.c b/ld/ldlang.c index 4ce3c935c17..62a4ed70415 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -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