This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: Commit: Enhance 'objdump -p' to display the contents of .rsrc sections
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Nick Clifton'" <nickc at redhat dot com>, <binutils at sourceware dot org>
- Date: Tue, 17 Dec 2013 15:54:29 +0100
- Subject: RE: Commit: Enhance 'objdump -p' to display the contents of .rsrc sections
- Authentication-results: sourceware.org; auth=none
- References: <87pppedokp dot fsf at redhat dot com>
Hi Nick,
your patch introduced a compilation error for mingw64
target in pe_print_rsrc function,
which is due to the infamous 'long' type is 32-bit of Windows OS
even for amd64 where pointer size is 64-bit.
Changing that typecast:
+ data = (bfd_byte *) (((long) (data + align)) & ~ align);
to:
+ data = (bfd_byte *) (((bfd_size_type) (data + align)) & ~ align);
is enough to fix the compilation error.
Could you fix the error or should I submit a full RFA?
Pierre Muller
maintainer of pascal language support in GDB.
> -----Message d'origine-----
> De : binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] De la part de Nick Clifton
> Envoyé : mardi 3 décembre 2013 14:58
> À : binutils@sourceware.org
> Objet : Commit: Enhance 'objdump -p' to display the contents of .rsrc
> sections
>
> Hi Guys,
>
> I am applying the attached patch to enhance objdump's -p output to
> include the contents of .rsrc sections found in COFF/PE binaries.
> This is part of a larger patch (still in development) which will
> handle the merging of .rsrc sections.
>
> Cheers
> Nick
>
> bfd/ChangeLog
> 2013-12-03 Nick Clifton <nickc@redhat.com>
>
> * peXXigen.c (pe_print_resource_entries): New function: Displays
> an entry in a .rsrc section.
> (pe_print_resource_directory): New function: Displays a directory
> in a .rsrc section.
> (pe_print_rsrc): New function: Displays the contents of .rsrc
> section.
> (_bfd_XX_print_private_bfd_data_common): Call pe_print_rsrc.
>
> binutils/testsuite/ChangeLog
> 2013-12-03 Nick Clifton <nickc@redhat.com>
>
> * binutils-all/windres/windres.exp: Run for x86_64-pc-cygwin.
> Add test of "objump -p" output.