http://sourceware.org/bugzilla/show_bug.cgi?id=9933

2009-03-09  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/9933
	* objcopy.c (filter_symbols): Properly handle common symbols
	in relocatable file.

===================================================================
RCS file: /cvs/src/src/binutils/objcopy.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -r1.125 -r1.126
--- src/binutils/objcopy.c	2009/01/29 13:03:21	1.125
+++ src/binutils/objcopy.c	2009/03/10 00:48:09	1.126
@@ -1028,7 +1028,8 @@
 	  used_in_reloc = TRUE;
 	}
       else if (relocatable			/* Relocatable file.  */
-	       && (flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
+	       && ((flags & (BSF_GLOBAL | BSF_WEAK)) != 0
+		   || bfd_is_com_section (bfd_get_section (sym))))
 	keep = TRUE;
       else if (bfd_decode_symclass (sym) == 'I')
 	/* Global symbols in $idata sections need to be retained

