This is the mail archive of the binutils@sources.redhat.com 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]

Re: Code Address In VTable


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


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