bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/17159] New: windres messes strings up on big-endian hosts


From: steve at sk2 dot org
Subject: [Bug binutils/17159] New: windres messes strings up on big-endian hosts
Date: Mon, 14 Jul 2014 21:00:40 +0000

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]