[patch]: dump of PE+ x64 pdata section

Kai Tietz ktietz70@googlemail.com
Mon Apr 6 07:23:00 GMT 2009


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[] =




-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination



More information about the Binutils mailing list