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


H.J. Lu wrote:
> On Fri, Apr 24, 2009 at 6:00 AM, Kai Tietz <ktietz70@googlemail.com> wrote:

>>
>> 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
> 
> I am trying to understand where the problem is. pe->pe_opthdr is
> supposed to target independent. Why doesn't it work for w64?

  HJ, your patch seems pretty naughty to me.  Binutils are clients of libbfd
and should not be tampering with private data like pe_data(abfd).  I see that
rescoff.c does this trick as well, we should fix that too.

Kai Tietz wrote:

> The issue here is that pep has an different structure for optional header. 
> Therefore the structure here has a different size. This is dependent to 
> the target type (See the defines I added in the new module for it).

  ISTM that if this stuff was exposed through a proper API with setters and
getters, there would be no 32/64 problem going on here; the problem is caused
by a client of bfd making assumptions about an internal private struct in bfd
and getting the wrong (for the bit size) definition.

    cheers,
      DaveK


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