This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: broken strip/objcopy


On Fri, Apr 24, 2009 at 03:00:18PM +0200, Kai Tietz wrote:
>Hello,
>
>2009/4/24 Kai Tietz <ktietz70@googlemail.com>:
>> Hello,
>>
>> The current implementation of objcopy/strip in binutils has problems,
>> because for pe-coff targets. It assumes at the moment that it is an
>> i386 version. This leads to issues (especially on strip) for PE+
>> target that binaries are getting corrupted. So I think we have here to
>> move those target specific pe-coff parts into seperate files. (I
>> assume that possibly for othe pe-coff targets then i386 the same
>> problem exists). Of course we could use here target specific macros to
>> change internal structures, but for a mulilib version of them this
>> isn't suitable anymore.
>> So possible somebody of you have a strong opinion about how this issue
>> could be solved. I'll prepare a patch for it and post it soon.
>
>Ah, I found the major issue here
>
>2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
>
>        PR binutils/10074
>
>This patch made objcopy and strip for PE-Coff target 32-bit PE only.
>This patch should fix it.
>
>ChangeLog
>
>2009-04-24  Kai Tietz  <kai.tietz@onevision.com>
>
>	* objcopy.c (pep_objcopy.h): Add include.
>	(copy_object): Add check for PE+ x86_64
>	and call for it pep_copy_object.
>	* pep_objcopy.c: New file.
>	(pep_copy_object): New implementation.
>	* pep_objcopy.h: New include.
>	(pep_copy_object): New declaration.
>	* Makefile.am: Add pep_objcopy.c to make.
>	* Makefile.in: Regenerated.
>
>Tested for x86_64-pc-mingw32. Ok for apply?

Not, IMO, no.

I think that all of the permutations that are now necessary to deal with
this belong in a separate file.  You created pep_objcopy.c.  why not
just move everything there and collapse that if?

And, you really need to test at least the 32-bit mingw variant too.

cgf


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