This is the mail archive of the binutils@sourceware.org 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]

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


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