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: [patch]: dump of PE+ x64 pdata section


On Mon, Apr 6, 2009 at 7:13 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Apr 6, 2009 at 12:23 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
>> 2009/4/6 Dave Korn <dave.korn.cygwin@googlemail.com>:
>>> Jan Kratochvil wrote:
>>>> Hi Kai,
>>>>
>>>> getting now on Fedora 10 x86_64:
>>>>
>>>> $ ./configure; make
>>>
>>> ?You didn't use --enable-targets=all, but you're still getting a PE backend
>>> in your BFD? ?That's odd.
>>>
>>>> ../bfd/.libs/libbfd.a(pex64igen.o): In function `_bfd_pep_print_x64_pdata':
>>>> .../binutils-cvs/bfd/pex64igen.c:1901: multiple definition of `_bfd_pep_print_x64_pdata'
>>>> ../bfd/.libs/libbfd.a(peigen.o):.../binutils-cvs/bfd/peigen.c:1901: first defined here
>>>
>>> ?Argh. ?Try changing the definition in peXXigen.c from
>>>
>>> _bfd_pep_print_x64_pdata
>>>
>>> to
>>>
>>> _bfd_XX_print_x64_pdata.
>>>
>>> ?It might also need wrapping in a #ifdef so that it only gets compiled for
>>> x64 targets.
>>>
>>> ?Sorry, can't help more right away; I just broke my world after a bad system
>>> update and am still scrambling to be able to build anything right now :-(
>>>
>>> ? ?cheers,
>>> ? ? ?DaveK
>>>
>>>
>>
>> Sorry, for this breakage. I want to use the 'ifdef COFF_WITH_pex64'
>> guard for this. So we prevent to generate useless functions for other
>> targets (as sadly the arm variant does).
>>
>> I tested the patch with all and it fixes my breakage.
>>
>> Is this patch ok for apply?
>>
>> Cheers,
>> Kai
>>
>> Index: src/bfd/peXXigen.c
>> ================================================================
>> --- src.orig/bfd/peXXigen.c
>> +++ src/bfd/peXXigen.c
>> @@ -1896,6 +1896,8 @@ _bfd_XX_print_ce_compressed_pdata (bfd *
>> ?}
>>
>> ?/* The PE+ x64 variant. ?*/
>> +
>> +#ifdef COFF_WITH_pex64
>> ?bfd_boolean
>> ?_bfd_pep_print_x64_pdata (bfd *abfd, void *vfile)
>> ?{
>> @@ -1974,6 +1976,8 @@ _bfd_pep_print_x64_pdata (bfd *abfd, voi
>> ? return TRUE;
>> ?#undef PDATA_ROW_SIZE
>> ?}
>> +#endif
>> +
>> ?^L
>> ?#define IMAGE_REL_BASED_HIGHADJ 4
>> ?static const char * const tbl[] =
>>
>
> ?Shouldn't _bfd_pep_print_x64_pdata be renamed to
>
> bfd_boolean _bfd_pex64_print_pdata (bfd *, void *);
>
>

Or this function should be moved to coff-x86-64.c.

-- 
H.J.


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