Code Address In VTable

Alan Modra amodra@bigpond.net.au
Thu Oct 10 21:34:00 GMT 2002


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



More information about the Binutils mailing list