This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Code Address In VTable
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Michal Ostrowski <mostrows at watson dot ibm dot com>
- Cc: dje at watson dot ibm dot com, Peter Bergner <bergner at vnet dot ibm dot com>, binutils at sources dot redhat dot com
- Date: Fri, 11 Oct 2002 14:04:28 +0930
- Subject: Re: Code Address In VTable
- References: <1034302579.31498.116735.camel@brick>
The last change I made to edit_opd broke linkonce function descriptor
symbols. Previously, edit_opd only removed opd entries when a
function was completely unused and gc-sections removed the function.
With linkonce functions, we want to remove opd entries for all but
the bfd containing the kept function code, and _not_ zap the symbol.
* elf64-ppc.c (edit_opd): Only zero opd syms when function
completely removed.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.66
diff -u -p -r1.66 elf64-ppc.c
--- bfd/elf64-ppc.c 8 Oct 2002 09:51:09 -0000 1.66
+++ bfd/elf64-ppc.c 11 Oct 2002 04:24:00 -0000
@@ -3762,7 +3762,7 @@ edit_opd (obfd, info)
|| sym_sec->output_section == bfd_abs_section_ptr);
if (skip)
{
- if (h != NULL)
+ if (h != NULL && sym_sec->owner == ibfd)
{
/* Arrange for the function descriptor sym
to be dropped. */
--
Alan Modra
IBM OzLabs - Linux Technology Centre