This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
.rela.rela.dyn on ppc64
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Tue, 8 Aug 2006 23:49:52 +0930
- Subject: .rela.rela.dyn on ppc64
When linking very large shared libs with --emit-relocs on PowerPC64, a
bug in the handling of relocations for long branch stubs will result in
a bogus .rela.rela.dyn section being created. It also causes ld to warn
that an assertion failed.
* elf64-ppc.c (ppc64_elf_build_stubs): Clear relbrlt reloc_count
after stubs have been built.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.241
diff -u -p -r1.241 elf64-ppc.c
--- bfd/elf64-ppc.c 23 Jun 2006 02:58:01 -0000 1.241
+++ bfd/elf64-ppc.c 8 Aug 2006 14:16:37 -0000
@@ -9561,6 +9561,9 @@ ppc64_elf_build_stubs (bfd_boolean emit_
/* Build the stubs as directed by the stub hash table. */
bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
+ if (htab->relbrlt != NULL)
+ htab->relbrlt->reloc_count = 0;
+
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
--
Alan Modra
IBM OzLabs - Linux Technology Centre