This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: windres regression with control strings spanning multiple lines
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: Brian Dessent <brian at dessent dot net>
- Cc: binutils at sourceware dot org, Nick Clifton <nickc at redhat dot com>
- Date: Mon, 17 Mar 2008 13:55:06 +0100
- Subject: Re: windres regression with control strings spanning multiple lines
Hi Brian,
> > > The attached patch seems to fix the issue for me, allowing both the
> > > testcase and a real app to build successfully.
> >
> > It would be really good if you could add a testcase to the binutils
> > testsuite as well, so that we have a chance of catching problems like
> > this in the future...
>
> I had thought of that, the problem is I don't know what to include as
> the expected result. That's why I tried the testcase with the Microsoft
> resource compiler in the hopes that it would give a canonical result. I
> also tried modifying the testcase to:
>
> 0 DIALOG 0,0,0,0
> BEGIN
> #ifdef SPAN
> LTEXT "This is a "
> "continued line",0,0,0,0,0
> #else
> LTEXT "This is a continued line",0,0,0,0,0
> #endif
> END
>
> ...and then comparing the output of windres with and without -DSPAN, but
> they differ in what seems to be unrelated parts of the file header:
>
> $ diff -u <(objdump -sj .rsrc tc-new.o | tail +5) \
> <(objdump -sj .rsrc tc-new-span.o | tail +5)
> --- /dev/fd/63 2006-11-30 16:00:00.000000000 -0800
> +++ /dev/fd/62 2006-11-30 16:00:00.000000000 -0800
> @@ -1,7 +1,7 @@
> - 0000 00000000 db60de47 00000000 00000100 .....`.G........
> - 0010 05000000 18000080 00000000 db60de47 .............`.G
> + 0000 00000000 af60de47 00000000 00000100 .....`.G........
> + 0010 05000000 18000080 00000000 af60de47 .............`.G
> 0020 00000000 00000100 00000000 30000080 ............0...
> - 0030 00000000 db60de47 00000000 00000100 .....`.G........
> + 0030 00000000 af60de47 00000000 00000100 .....`.G........
> 0040 09040000 48000000 58000000 62000000 ....H...X...b...
> 0050 00000000 00000000 00008880 00000000 ................
> 0060 01000000 00000000 00000000 00000000 ................
>
> I'm not sure what fields those bytes represent, and whether they matter
> or are just coincidental uninitialized foo. I suppose the test could
> ignore the first 0x40 bytes of the section if that makes the results
> stable.
These are timestamps, so this variant won't work.
> Of course the test could just test that the output matches the exact
> output of what the current patched windres generates, but that seems
> like a fragile test given the above instability.
Cheers,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.