https://sourceware.org/bugzilla/show_bug.cgi?id=17159

            Bug ID: 17159
           Summary: windres messes strings up on big-endian hosts
           Product: binutils
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: steve at sk2 dot org

Hi,

This is forwarded from https://bugs.debian.org/754829. On s390x (I also checked
on powerpc), windres miscompiles the following:

$ echo 'STRINGTABLE { 1, "String" }' | i686-w64-mingw32-windres

/* Type: stringtable

   Name: 1.  */
LANGUAGE 9, 1

STRINGTABLE MOVEABLE PURE DISCARDABLE
BEGIN
  1, L"\x5300\x7400\x7200\x6900\x6e00\x6700"
END


where the correct result would be, as produced on x86_64 for example:

$ echo 'STRINGTABLE { 1, "String" }' | i686-w64-mingw32-windres 

/* Type: stringtable

   Name: 1.  */
LANGUAGE 9, 1

STRINGTABLE MOVEABLE PURE DISCARDABLE
BEGIN
  1, "String"
END


Prefixing the string with L fixes things; on s390x:

$ echo 'STRINGTABLE { 1, L"String" }' | i686-w64-mingw32-windres           
/* Type: stringtable

   Name: 1.  */
LANGUAGE 9, 1

STRINGTABLE MOVEABLE PURE DISCARDABLE
BEGIN
  1, "String"
END


So I'm guessing this is something to do with the multibyte expansion in
wind_MultiByteToWideChar()...

Regards,

Stephen

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to