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. */
*** Bug 3961 has been marked as a duplicate of this bug. ***
*** Bug 4412 has been marked as a duplicate of this bug. ***
Fixed by http://sourceware.org/ml/binutils/2007-05/msg00315.html