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 9:31 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.
>>
>
> Binutils won't build with --enable-targets=all on Linux/x86-64:
>
> libtool: compile: ?gcc -DHAVE_CONFIG_H -I.
> -I/export/gnu/import/svn/binutils/src/bfd -I. -I.
> -I/export/gnu/import/svn/binutils/src/bfd
> -I/export/gnu/import/svn/binutils/src/bfd/../include -W -Wall
> -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c
> /export/gnu/import/svn/binutils/src/bfd/pei-x86_64.c -o pei-x86_64.o
> In file included from
> /export/gnu/import/svn/binutils/src/bfd/coff-x86_64.c:718:/export/gnu/import/svn/binutils/src/bfd/coffcode.h:5414:
> error: ‘_bfd_pep_print_x64_pdata’ undeclared here (not in a function)
> cc1: warnings being treated as errors
> /export/gnu/import/svn/binutils/src/bfd/coffcode.h:5415: error:
> missing initializer
> /export/gnu/import/svn/binutils/src/bfd/coffcode.h:5415: error: (near
> initialization for ‘bfd_coff_std_swap_table._bfd_coff_print_pdata’)
> make[6]: *** [coff-x86_64.lo] Error 1
>
>


I am checking in this patch to fix binutils build.


-- 
H.J.
---
2009-04-05  H.J. Lu  <hongjiu.lu@intel.com>

	* coff-x86_64.c (bfd_pe_print_pdata): Defined to
	_bfd_pex64_print_pdata only if PE is defined.

	* libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
	(_bfd_pex64_print_pdata): This.

	* peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
	(_bfd_pex64_print_pdata): This.  Defined only if COFF_WITH_pex64
	is defined.

Attachment: bfd-bar-1.patch
Description: Text document


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