powerpc64 --gc-sections

Alan Modra amodra@bigpond.net.au
Wed Aug 7 17:19:00 GMT 2002


On Wed, Aug 07, 2002 at 02:49:41PM +0930, Alan Modra wrote:
> Anybody know why we shouldn't drop them completely by changing

After looking at all the elf_backend_link_output_symbol_hook
functions, I'm convinced it's OK.

bfd/ChangeLog
	* elflink.h (elf_link_output_extsym): Don't output symbols from
	SEC_EXCLUDE sections.

Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.179
diff -u -p -r1.179 elflink.h
--- bfd/elflink.h	25 Jul 2002 06:54:51 -0000	1.179
+++ bfd/elflink.h	7 Aug 2002 12:20:27 -0000
@@ -6342,7 +6342,7 @@ elf_link_output_extsym (h, data)
 
   /* If we're stripping it, then it was just a dynamic symbol, and
      there's nothing else to do.  */
-  if (strip)
+  if (strip || (input_sec->flags & SEC_EXCLUDE) != 0)
     return true;
 
   h->indx = bfd_get_symcount (finfo->output_bfd);

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list