This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PowerPC64 dot-symbol fix
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Sat, 8 Sep 2007 23:15:35 +0930
- Subject: PowerPC64 dot-symbol fix
Someone sent me a core file recently for a powerpc64 ld crash. Not
the easiest way to debug linker problems, but the core showed me that
somehow ld decided to use a function descriptor symbol in a regular
file and rather than its associated function entry dot-symbol
in the same file, a symbol of the same name in a shared lib. I think
the following patch ought to cure this.
* elf64-ppc.c (func_desc_adjust): When resolving undefined
references to dot-symbols, transfer def_regular and
def_dynamic from the descriptor symbol.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.265
diff -u -p -r1.265 elf64-ppc.c
--- bfd/elf64-ppc.c 13 Aug 2007 00:20:58 -0000 1.265
+++ bfd/elf64-ppc.c 8 Sep 2007 08:07:48 -0000
@@ -5651,6 +5651,8 @@ func_desc_adjust (struct elf_link_hash_e
{
fh->elf.root.type = fh->oh->elf.root.type;
fh->elf.forced_local = 1;
+ fh->elf.def_regular = fh->oh->elf.def_regular;
+ fh->elf.def_dynamic = fh->oh->elf.def_dynamic;
}
/* If this is a function code symbol, transfer dynamic linking
--
Alan Modra
Australia Development Lab, IBM