[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30376] windres cannot parse rc files which it itself gener
From: |
nickc at redhat dot com |
Subject: |
[Bug binutils/30376] windres cannot parse rc files which it itself generated |
Date: |
Wed, 04 Oct 2023 15:59:02 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30376
--- Comment #10 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Pali Rohár from comment #7)
> "resource_name4" "resource_type4" { "resource_string_data4" }
> i686-w64-mingw32-windres: test-resource.rc:4: syntax error
Right - this is the same issue as described in comment #3. The parser thinks
that you are concatenating two double-quoted-strings together to make a single
resource name that includes a space in the middle. Since spaces are not
allowed in resource names it signals a syntax error.
> Binary resource test-resource.ms.res compiled by MS compiler I can put into
> resource-only DLL via MS linker and then list its content via wrestool:
> --type='"RESOURCE_TYPE4"' --name='"RESOURCE_TYPE4"' --language=1033
> And now if I decompile resource.ms.res via GNU windres I get following
> output:
>
> $ i686-w64-mingw32-windres test-resource.ms.res
>
> /* Type: """RESOURCE_TYPE4"""
>
> Name: """RESOURCE_NAME4""". */
>
> """RESOURCE_NAME4""" """RESOURCE_TYPE4""" MOVEABLE PURE
> BEGIN
> 0x6f736572L, 0x65637275L, 0x7274735fL, 0x5f676e69L, 0x61746164L,
> "4"
> END
> It is clear that it is not what was on the input as resource name and types
> have messed quote character.
I think that the triple quotes are an attempt to encode a single quote without
it having any kind of special meaning. But in practice this does not work.
I think the point that you are trying to make however is that the MS resource
compiler actually includes the double quote characters as part of the resource
names, correct ?
I will have a look into this now.
--
You are receiving this mail because:
You are on the CC list for the bug.