This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
powerpc64 mixing dot-sym and non-dot-sym again
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Tue, 1 Mar 2005 09:30:04 +1030
- Subject: powerpc64 mixing dot-sym and non-dot-sym again
Yet another case where the linker does the wrong thing. This time we
had an old object referencing ".error", a new object defining "error",
and an old shared lib defining both ".error" and "error". The right
behaviour is for the "error" in a regular object file to satisfy
function references to either ".error" or "error". Instead, the
".error" reference went to the shared lib.
* elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
entry points with the func descriptor as well as undefweak.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.192
diff -u -p -r1.192 elf64-ppc.c
--- bfd/elf64-ppc.c 16 Feb 2005 02:20:10 -0000 1.192
+++ bfd/elf64-ppc.c 28 Feb 2005 22:45:10 -0000
@@ -8786,8 +8786,7 @@ ppc64_elf_size_stubs (bfd *output_bfd,
sym_value = 0;
/* Recognise an old ABI func code entry sym, and
use the func descriptor sym instead. */
- if (hash->elf.root.type == bfd_link_hash_undefweak
- && hash->elf.root.root.string[0] == '.'
+ if (hash->elf.root.root.string[0] == '.'
&& (fdh = get_fdh (hash, htab)) != NULL)
{
if (fdh->elf.root.type == bfd_link_hash_defined
--
Alan Modra
IBM OzLabs - Linux Technology Centre