From mboxrd@z Thu Jan 1 00:00:00 1970 From: manfred@lts.sel.alcatel.de To: Ian Lance Taylor Cc: gas2@cygnus.com, bfd@cygnus.com Subject: Re: New binutils release Date: Wed, 19 Jun 1996 01:14:00 -0000 Message-id: <9606190729.AA26660@lts.sel.alcatel.de> References: <9606190452.AA18863@tweedledumb.cygnus.com> X-SW-Source: 1996/msg00041.html 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 + + * 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 * 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