Strip 2.13 corrupts exe file

Danny Smith danny_r_smith_2001@yahoo.co.nz
Thu Mar 20 10:16:00 GMT 2003


 --- Nick Clifton <nickc@redhat.com> wrote: > Hi Richard,
> 
> > Yes! With the patch applied, the stipped exe file works as
> > expected. Thanks a lot, this was driving us quite mad.
> 
> Excellent - I will apply it to the sources.
> 
> > One more question: isn't it strange I am the only one stumbling upon
> > this? Or are the internals of our executable very non-standard? (I am
> > not too familiar with pei-i386 myself.)
> 
> Well PE and PEI are standard formats, so that is not the problem.  I
> guess that most people (who use them) are not stripping their
> binaries.  The bug only affected strip (and objcopy), so if you did
> not use those tools you would not encounter the problem.
> 

Huh, I use strip (built from CVS) quite a bit on mingw produced executables
(including daily builds of GCC) and have not seen any problems.

For many years, the memset in _bfd_XXi_swap_aouthdr_out was a no-op because the
arguments were reversed.

Then:

2002-07-16  Moritz Jodeit  <moritz@jodeit.org>

	* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.

Donn Terry reported the problem with  nulling out all data directory entries in
August and suggested that the call to memset could just be eliminated.  I've
tried his suggestion and have seen no problems.  But then again I haven't seen
any problems when the memset is actually working either.  So I too find it
strange that no-one to my knowledge  on mingw or cygwin lists has complained
until now. 

Danny

Danny

> Cheers
>         Nick
>  

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.



More information about the Binutils mailing list