glibc built without .gnu.warning.symbol sections

Alan Modra amodra@gmail.com
Sat Jul 20 09:47:00 GMT 2013


The fix for PR 12761 results in glibc libc.so.6 being built without
warning sections.  Fixed as follows.

	PR ld/15762
	* elflink.c (elf_link_add_object_symbols): Don't clobber
	.gnu.warning.symbol sections when shared.

Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.494
diff -u -p -r1.494 elflink.c
--- bfd/elflink.c	8 May 2013 23:31:38 -0000	1.494
+++ bfd/elflink.c	20 Jul 2013 09:34:39 -0000
@@ -3444,7 +3445,7 @@ elf_link_add_object_symbols (bfd *abfd, 
 		      FALSE, bed->collect, NULL)))
 		goto error_return;
 
-	      if (! info->relocatable)
+	      if (!info->relocatable && !info->shared)
 		{
 		  /* Clobber the section size so that the warning does
 		     not get copied into the output file.  */

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list