* peXXigen.c (rsrc_print_section): Use ptrdiff_t as the type for
authorNick Clifton <nickc@redhat.com>
Wed, 18 Dec 2013 10:30:25 +0000 (10:30 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 18 Dec 2013 10:30:25 +0000 (10:30 +0000)
pointer arithmetic.

bfd/ChangeLog
bfd/peXXigen.c

index 5630be5f37481127c53d0c0a64e7a8076cdcd497..62fc7656dc244e3a5f819a5ec202efe27cd58f96 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-18  Nick Clifton  <nickc@redhat.com>
+
+       * peXXigen.c (rsrc_print_section): Use ptrdiff_t as the type for
+       pointer arithmetic.
+
 2013-12-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf32-arm.c (elf32_arm_post_process_headers): Call
        (rsrc_process_section): New function - merges the contents of a
        .rsrc section.
        (_bfd_XXi_final_link_postscript): Call rsrc_process_section.
+       (rsrc_print_section): Fix mingw64 size issue.
+
        * configure.in (AC_CHECK_HEADERS): Add wchar.h
        * config.in: Regenerate.
        * configure: Regenerate.
index 5e2a876ba17db1e04f2029883a0d222e1518e2c5..2a33a776b7d6966beeef4f2b81867055a595dbed 100644 (file)
@@ -2205,7 +2205,7 @@ rsrc_print_section (bfd * abfd, void * vfile)
          /* Align data before continuing.  */
          int align = (1 << section->alignment_power) - 1;
 
-         data = (bfd_byte *) (((long) (data + align)) & ~ align);
+         data = (bfd_byte *) (((ptrdiff_t) (data + align)) & ~ align);
          rva_bias += data - p;
 
          /* For reasons that are unclear .rsrc sections are sometimes created