This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

Re: New binutils release


Hi there,

I found a bug in the generic output routine in linker.c, which emits symbols
even if you specify `-s' (strip all) on the linker command-line; obviously
the check for (info->strip == strip_all) is missing:

diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el /u/b60/manfred/tmp/orig/binutils-2.6/bfd/ChangeLog binutils-2.6/bfd/ChangeLog
*** /u/b60/manfred/tmp/orig/binutils-2.6/bfd/ChangeLog	Fri Nov 17 02:42:59 1995
--- binutils-2.6/bfd/ChangeLog	Wed Jun 19 09:22:21 1996
***************
*** 1,3 ****
--- 1,8 ----
+ Wed Jun 19 07:20:56 1996  Manfred Hollstein KS/EIC5 60/3/142 #40283  <manfred@lts.sel.alcatel.de>
+ 
+ 	* linker.c (_bfd_generic_link_output_symbols): Don't output any
+ 	symbol if info->strip == strip_all.
+ 
  Thu Nov 16 17:32:55 1995  Ken Raeburn  <raeburn@cygnus.com>
  
  	* VERSION: Updated to 2.6.
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el /u/b60/manfred/tmp/orig/binutils-2.6/bfd/linker.c binutils-2.6/bfd/linker.c
*** /u/b60/manfred/tmp/orig/binutils-2.6/bfd/linker.c	Fri Nov  3 05:17:42 1995
--- binutils-2.6/bfd/linker.c	Wed Jun 19 09:17:22 1996
*************** _bfd_generic_link_output_symbols (output
*** 2155,2164 ****
  
        /* This switch is straight from the old code in
  	 write_file_locals in ldsym.c.  */
!       if (info->strip == strip_some
! 	  && (bfd_hash_lookup (info->keep_hash, bfd_asymbol_name (sym),
! 			       false, false)
! 	      == (struct bfd_hash_entry *) NULL))
  	output = false;
        else if ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
  	{
--- 2155,2165 ----
  
        /* This switch is straight from the old code in
  	 write_file_locals in ldsym.c.  */
!       if (info->strip == strip_all
! 	  || (info->strip == strip_some
! 	      && (bfd_hash_lookup (info->keep_hash, bfd_asymbol_name (sym),
! 				   false, false)
! 		  == (struct bfd_hash_entry *) NULL)))
  	output = false;
        else if ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
  	{

 Manfred Hollstein			Alcatel TELECOM, Dept. KS/EIC5
 e-mail: manfred@lts.sel.alcatel.de	Lorenzstrasse 10
 Phone: +49 711 821 40283		70435 Stuttgart
 Fax:	+49 711 821 40196		Germany