Bug 2737 - windres depends on host's endianness and bitness
Summary: windres depends on host's endianness and bitness
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
: 3961 4412 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-09 07:37 UTC by Sir Raorn
Modified: 2007-06-18 19:02 UTC (History)
3 users (show)

See Also:
Host: x86_64-alt-linux
Target: i386-mingw32msvc
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sir Raorn 2006-06-09 07:37:58 UTC
windres uses unsigned long for fwrite'ing 32-bit little-endian integers (DWORD).
 This breaks cross tools on 64-bit and/or bigendian hosts.

When writing res file, resource header (write_res_header() from resres.c) is two
64-bit integers instead of 32 bit.

There's also FIXME in code about that issue (resres.c):

/* FIXME: This file does not work correctly in a cross configuration.
   It assumes that it can use fread and fwrite to read and write
   integers.  It does no swapping.  */
Comment 1 H.J. Lu 2007-03-11 16:37:43 UTC
*** Bug 3961 has been marked as a duplicate of this bug. ***
Comment 2 H.J. Lu 2007-04-24 14:51:03 UTC
*** Bug 4412 has been marked as a duplicate of this bug. ***
Comment 3 H.J. Lu 2007-06-18 19:02:37 UTC
Fixed by

http://sourceware.org/ml/binutils/2007-05/msg00315.html