This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Fix --dynamic-list
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>, Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 10 Oct 2006 17:49:36 +0200
- Subject: [PATCH] Fix --dynamic-list
- References: <20060724221020.GA22024@lucon.org> <Pine.LNX.4.64.0607261822590.25141@wotan.suse.de> <20060727171133.GA14609@lucon.org> <Pine.LNX.4.64.0607281452000.25141@wotan.suse.de> <20060728174040.GA24620@lucon.org> <20060808165950.GA27903@lucon.org> <Pine.LNX.4.64.0608081928530.25141@wotan.suse.de> <20060809193918.GA5352@lucon.org> <45003A75.3080501@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Sep 07, 2006 at 04:27:49PM +0100, Nick Clifton wrote:
> >2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
...
> > * 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 libdl2b.so
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 <jakub@redhat.com>
* 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;
}
else
Jakub