This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix --dynamic-list

On Thu, Sep 07, 2006 at 04:27:49PM +0100, Nick Clifton wrote:
> >2006-08-08  H.J. Lu  <>
> >	* ldlang.c (lang_process): Call lang_finalize_version_expr_head
> >	on link_info.dynamic if needed.
> >	(lang_append_dynamic_list): New.
> >	(lang_append_dynamic_list_cpp_typeinfo): New.
> >	* ldlang.h (lang_append_dynamic_list): Likewise.
> >	* ldlang.h (lang_append_dynamic_list_cpp_typeinfo): Likewise.

I'm getting
FAIL: Run with
failure on ppc64.

The problem is that unlike the other arches, ppc64 has for the dl2xxx.list
dynamic-list 2 entries in the list rather than just one (.xxx and xxx) and
lang_append_dynamic_list clearly assumes that the second and following
--dynamic-list's have just a single symbol name in it.

Fixed thusly, ok to commit?

BTW, I have noticed that you have changed info->symbolic to SYMBOLIC_BIND
in a bunch of generic places and i386,x86_64,ia64 ELF backends, but not at
all in the other backends.  Should that be changed in all the other
backends too?  I see the remaining ->symbolic in elflink.c is intentional,
but what about elf32-arm.c, elf32-bfin.c, elf32-cris.c, elf32-hppa.c,
elf32-i370.c, elf32-m32r.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
elf32-score.c, elf32-sh.c, elf32-vax.c, elf64-alpha.c, elf64-hppa.c,
elf64-s390.c, elf64-sh64.c, elf-m10300.c, elfxx-mips.c and elfxx-sparc.c?

2006-10-10  Jakub Jelinek  <>

	* ldlang.c (lang_append_dynamic_list): When appending, add all elements
	of the dynamic list rather than just the first entry.

--- ld/ldlang.c.jj	2006-09-27 19:24:20.000000000 +0200
+++ ld/ldlang.c	2006-10-10 17:35:16.000000000 +0200
@@ -6960,7 +6960,10 @@ lang_append_dynamic_list (struct bfd_elf
   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;


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