From 1d73eefe2817e0ad82a902a26f8ca9ad46afc19b Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 11 Oct 2011 15:56:27 +0000 Subject: PR binutils/13051 Fix a syntax error bug when compiling rc files with the VERSIONINFO resource containing more than one language block inside a single StringFileInfo block. * windint.h (rc_ver_stringtable): New structure definition. (rc_ver_info): Use it. * rcparse.y (verstringtable): New variable. (verstringtables): New type. (verstringtables:): New rule declaration. (verblocks:): Use it. * resrc.c (append_ver_stringtable): New function. (append_ver_stringfileinfo): Update to use stringtables. * windres.h (append_ver_stringfileinfo): Update declaration. (append_ver_stringtable): New declaration. * resrc.c (write_rc_versioninfo): Update to support multiple blocks. * resbin.c (bin_to_res_version): Likewise. (res_to_bin_versioninfo): Likewise. * binutils-all\windres\version.rsd: Regenerate. * binutils-all\windres\version_cat.rsd: Regenerate. * binutils-all\windres\version_mlang.rc: Add new test. * binutils-all\windres\version_mlang.rsd: Likewise. --- binutils/ChangeLog | 20 +++ binutils/rcparse.y | 21 ++- binutils/resbin.c | 158 +++++++++++++-------- binutils/resrc.c | 56 +++++--- binutils/testsuite/ChangeLog | 8 ++ .../testsuite/binutils-all/windres/version.rsd | 10 +- .../testsuite/binutils-all/windres/version_cat.rsd | 6 +- .../binutils-all/windres/version_mlang.rc | 43 ++++++ .../binutils-all/windres/version_mlang.rsd | 87 ++++++++++++ binutils/windint.h | 18 ++- binutils/windres.h | 5 +- 11 files changed, 333 insertions(+), 99 deletions(-) create mode 100644 binutils/testsuite/binutils-all/windres/version_mlang.rc create mode 100644 binutils/testsuite/binutils-all/windres/version_mlang.rsd (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2d66216412..4d629eca3a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,23 @@ +2011-10-11 Chris + + PR binutils/13051 + Fix a syntax error bug when compiling rc files with the VERSIONINFO resource + containing more than one language block inside a single StringFileInfo block. + + * windint.h (rc_ver_stringtable): New structure definition. + (rc_ver_info): Use it. + * rcparse.y (verstringtable): New variable. + (verstringtables): New type. + (verstringtables:): New rule declaration. + (verblocks:): Use it. + * resrc.c (append_ver_stringtable): New function. + (append_ver_stringfileinfo): Update to use stringtables. + * windres.h (append_ver_stringfileinfo): Update declaration. + (append_ver_stringtable): New declaration. + * resrc.c (write_rc_versioninfo): Update to support multiple blocks. + * resbin.c (bin_to_res_version): Likewise. + (res_to_bin_versioninfo): Likewise. + 2011-10-10 Nick Clifton * po/bg.po: Updated Bulgarian translation. diff --git a/binutils/rcparse.y b/binutils/rcparse.y index 8caa3ef94d..e260792912 100644 --- a/binutils/rcparse.y +++ b/binutils/rcparse.y @@ -1,6 +1,6 @@ %{ /* rcparse.y -- parser for Windows rc files - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, + 2011 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Extended by Kai Tietz, Onevision. @@ -79,6 +79,7 @@ static const rc_res_id res_null_text = { 1, {{0, &null_unichar}}}; rc_rcdata_item *rcdata_item; rc_fixed_versioninfo *fixver; rc_ver_info *verinfo; + rc_ver_stringtable *verstringtable; rc_ver_stringinfo *verstring; rc_ver_varinfo *vervar; rc_toolbar_item *toobar_item; @@ -150,6 +151,7 @@ static const rc_res_id res_null_text = { 1, {{0, &null_unichar}}}; %type opt_control_data %type fixedverinfo %type verblocks +%type verstringtables %type vervals %type vertrans %type toolbar_data @@ -1471,9 +1473,9 @@ verblocks: { $$ = NULL; } - | verblocks BLOCKSTRINGFILEINFO BEG BLOCK BEG vervals END END + | verblocks BLOCKSTRINGFILEINFO BEG verstringtables END { - $$ = append_ver_stringfileinfo ($1, $4, $6); + $$ = append_ver_stringfileinfo ($1, $4); } | verblocks BLOCKVARFILEINFO BEG VALUE res_unicode_string_concat vertrans END { @@ -1481,6 +1483,17 @@ verblocks: } ; +verstringtables: + /* empty */ + { + $$ = NULL; + } + | verstringtables BLOCK BEG vervals END + { + $$ = append_ver_stringtable ($1, $2, $4); + } + ; + vervals: /* empty */ { diff --git a/binutils/resbin.c b/binutils/resbin.c index b3682f72ad..b5dcd9b5f2 100644 --- a/binutils/resbin.c +++ b/binutils/resbin.c @@ -1,5 +1,5 @@ /* resbin.c -- manipulate the Windows binary resource format. - Copyright 1997, 1998, 1999, 2002, 2003, 2005, 2006, 2007, 2009, 2010 + Copyright 1997, 1998, 1999, 2002, 2003, 2005, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Rewritten by Kai Tietz, Onevision. @@ -1027,7 +1027,7 @@ bin_to_res_version (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type lengt if (ch == 'S') { - rc_ver_stringinfo **ppvs; + rc_ver_stringtable **ppvst; vi->type = VERINFO_STRING; @@ -1041,36 +1041,54 @@ bin_to_res_version (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type lengt data += off; length -= off; - get_version_header (wrbfd, data, length, (const char *) NULL, - &vi->u.string.language, &verlen, &vallen, - &type, &off); - - if (vallen != 0) - fatal (_("unexpected version stringtable value length %ld"), (long) vallen); - - data += off; - length -= off; - verlen -= off; - - vi->u.string.strings = NULL; - ppvs = &vi->u.string.strings; - /* It's convenient to round verlen to a 4 byte alignment, since we round the subvariables in the loop. */ + verlen = (verlen + 3) &~ 3; + vi->u.string.stringtables = NULL; + ppvst = &vi->u.string.stringtables; + while (verlen > 0) + { + rc_ver_stringtable *vst; + rc_uint_type stverlen; + rc_ver_stringinfo **ppvs; + + if (length < 8) + toosmall (_("version stringtable")); + + vst = (rc_ver_stringtable *) res_alloc (sizeof (rc_ver_stringtable)); + + get_version_header (wrbfd, data, length, (const char *) NULL, + &vst->language, &stverlen, &vallen, &type, &off); + + if (vallen != 0) + fatal (_("unexpected version stringtable value length %ld"), (long) vallen); + + data += off; + length -= off; + verlen -= off; + + stverlen = (stverlen + 3) &~ 3; + + vst->strings = NULL; + ppvs = &vst->strings; + + while (stverlen > 0) { rc_ver_stringinfo *vs; - rc_uint_type subverlen, vslen, valoff; + rc_uint_type sverlen, vslen, valoff; + + if (length < 8) + toosmall (_("version string")); - vs = (rc_ver_stringinfo *) res_alloc (sizeof *vs); + vs = (rc_ver_stringinfo *) res_alloc (sizeof (rc_ver_stringinfo)); - get_version_header (wrbfd, data, length, - (const char *) NULL, &vs->key, &subverlen, - &vallen, &type, &off); + get_version_header (wrbfd, data, length, (const char *) NULL, + &vs->key, &sverlen, &vallen, &type, &off); - subverlen = (subverlen + 3) &~ 3; + sverlen = (sverlen + 3) &~ 3; data += off; length -= off; @@ -1079,22 +1097,26 @@ bin_to_res_version (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type lengt valoff = vslen * 2 + 2; valoff = (valoff + 3) &~ 3; - if (off + valoff != subverlen) + if (off + valoff != sverlen) fatal (_("unexpected version string length %ld != %ld + %ld"), - (long) subverlen, (long) off, (long) valoff); - - vs->next = NULL; - *ppvs = vs; - ppvs = &vs->next; + (long) sverlen, (long) off, (long) valoff); data += valoff; length -= valoff; - if (verlen < subverlen) + if (stverlen < sverlen) fatal (_("unexpected version string length %ld < %ld"), - (long) verlen, (long) subverlen); + (long) verlen, (long) sverlen); + stverlen -= sverlen; + + vs->next = NULL; + *ppvs = vs; + ppvs = &vs->next; + } - verlen -= subverlen; + vst->next = NULL; + *ppvst = vst; + ppvst = &vst->next; } } else if (ch == 'V') @@ -2005,52 +2027,62 @@ res_to_bin_versioninfo (windres_bfd *wrbfd, rc_uint_type off, abort (); case VERINFO_STRING: { - struct bin_ver_info bvsd; - rc_uint_type vs_off; - const rc_ver_stringinfo *vs; + const rc_ver_stringtable *vst; off = string_to_unicode_bin (wrbfd, off, "StringFileInfo"); - off += (4 - ((off - off_delta) & 3)) & 3; - - vs_off = off; - - off += BIN_VER_INFO_SIZE; - off = unicode_to_bin (wrbfd, off, vi->u.string.language); + if (!vi->u.string.stringtables) + off += (4 - ((off - off_delta) & 3)) & 3; - for (vs = vi->u.string.strings; vs != NULL; vs = vs->next) + for (vst = vi->u.string.stringtables; vst != NULL; vst = vst->next) { - struct bin_ver_info bvss; - rc_uint_type vss_off,str_off; + struct bin_ver_info bvst; + rc_uint_type vst_off; + const rc_ver_stringinfo *vs; off += (4 - ((off - off_delta) & 3)) & 3; - vss_off = off; + vst_off = off; off += BIN_VER_INFO_SIZE; - off = unicode_to_bin (wrbfd, off, vs->key); + off = unicode_to_bin (wrbfd, off, vst->language); - off += (4 - ((off - off_delta) & 3)) & 3; + for (vs = vst->strings; vs != NULL; vs = vs->next) + { + struct bin_ver_info bvs; + rc_uint_type vs_off, str_off; + + off += (4 - ((off - off_delta) & 3)) & 3; + + vs_off = off; + off += BIN_VER_INFO_SIZE; + + off = unicode_to_bin (wrbfd, off, vs->key); + + off += (4 - ((off - off_delta) & 3)) & 3; + + str_off = off; + off = unicode_to_bin (wrbfd, off, vs->value); + + if (wrbfd) + { + windres_put_16 (wrbfd, bvs.size, off - vs_off); + windres_put_16 (wrbfd, bvs.sig1, (off - str_off) / 2); + windres_put_16 (wrbfd, bvs.sig2, 1); + set_windres_bfd_content (wrbfd, &bvs, vs_off, + BIN_VER_INFO_SIZE); + } + } - str_off = off; - off = unicode_to_bin (wrbfd, off, vs->value); if (wrbfd) { - windres_put_16 (wrbfd, bvss.size, off - vss_off); - windres_put_16 (wrbfd, bvss.sig1, (off - str_off) / 2); - windres_put_16 (wrbfd, bvss.sig2, 1); - set_windres_bfd_content (wrbfd, &bvss, vss_off, - BIN_VER_INFO_SIZE); + windres_put_16 (wrbfd, bvst.size, off - vst_off); + windres_put_16 (wrbfd, bvst.sig1, 0); + windres_put_16 (wrbfd, bvst.sig2, 1); + set_windres_bfd_content (wrbfd, &bvst, vst_off, + BIN_VER_INFO_SIZE); } } - if (wrbfd) - { - windres_put_16 (wrbfd, bvsd.size, off - vs_off); - windres_put_16 (wrbfd, bvsd.sig1, 0); - windres_put_16 (wrbfd, bvsd.sig2, 0); - set_windres_bfd_content (wrbfd, &bvsd, vs_off, - BIN_VER_INFO_SIZE); - } break; } @@ -2100,9 +2132,9 @@ res_to_bin_versioninfo (windres_bfd *wrbfd, rc_uint_type off, if (wrbfd) { - windres_put_16 (wrbfd, bv.size, off-bv_off); + windres_put_16 (wrbfd, bv.size, off - bv_off); windres_put_16 (wrbfd, bv.sig1, 0); - windres_put_16 (wrbfd, bv.sig2, 0); + windres_put_16 (wrbfd, bv.sig2, 1); set_windres_bfd_content (wrbfd, &bv, bv_off, BIN_VER_INFO_SIZE); } diff --git a/binutils/resrc.c b/binutils/resrc.c index 0a14ad23fb..a0308dfd90 100644 --- a/binutils/resrc.c +++ b/binutils/resrc.c @@ -1,5 +1,5 @@ /* resrc.c -- read and write Windows rc files. - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008 + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2011 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Rewritten by Kai Tietz, Onevision. @@ -1803,16 +1803,15 @@ define_versioninfo (rc_res_id id, rc_uint_type language, /* Add string version info to a list of version information. */ rc_ver_info * -append_ver_stringfileinfo (rc_ver_info *verinfo, const char *language, - rc_ver_stringinfo *strings) +append_ver_stringfileinfo (rc_ver_info *verinfo, + rc_ver_stringtable *stringtables) { rc_ver_info *vi, **pp; vi = (rc_ver_info *) res_alloc (sizeof (rc_ver_info)); vi->next = NULL; vi->type = VERINFO_STRING; - unicode_from_ascii ((rc_uint_type *) NULL, &vi->u.string.language, language); - vi->u.string.strings = strings; + vi->u.string.stringtables = stringtables; for (pp = &verinfo; *pp != NULL; pp = &(*pp)->next) ; @@ -1821,6 +1820,25 @@ append_ver_stringfileinfo (rc_ver_info *verinfo, const char *language, return verinfo; } +rc_ver_stringtable * +append_ver_stringtable (rc_ver_stringtable *stringtable, + const char *language, + rc_ver_stringinfo *strings) +{ + rc_ver_stringtable *vst, **pp; + + vst = (rc_ver_stringtable *) res_alloc (sizeof (rc_ver_stringtable)); + vst->next = NULL; + unicode_from_ascii ((rc_uint_type *) NULL, &vst->language, language); + vst->strings = strings; + + for (pp = &stringtable; *pp != NULL; pp = &(*pp)->next) + ; + *pp = vst; + + return stringtable; +} + /* Add variable version info to a list of version information. */ rc_ver_info * @@ -3264,25 +3282,31 @@ write_rc_versioninfo (FILE *e, const rc_versioninfo *versioninfo) { case VERINFO_STRING: { + const rc_ver_stringtable *vst; const rc_ver_stringinfo *vs; fprintf (e, " BLOCK \"StringFileInfo\"\n"); fprintf (e, " BEGIN\n"); - fprintf (e, " BLOCK "); - unicode_print_quoted (e, vi->u.string.language, -1); - fprintf (e, "\n"); - fprintf (e, " BEGIN\n"); - for (vs = vi->u.string.strings; vs != NULL; vs = vs->next) + for (vst = vi->u.string.stringtables; vst != NULL; vst = vst->next) { - fprintf (e, " VALUE "); - unicode_print_quoted (e, vs->key, -1); - fprintf (e, ", "); - unicode_print_quoted (e, vs->value, -1); + fprintf (e, " BLOCK "); + unicode_print_quoted (e, vst->language, -1); + fprintf (e, "\n"); - } + fprintf (e, " BEGIN\n"); + + for (vs = vst->strings; vs != NULL; vs = vs->next) + { + fprintf (e, " VALUE "); + unicode_print_quoted (e, vs->key, -1); + fprintf (e, ", "); + unicode_print_quoted (e, vs->value, -1); + fprintf (e, "\n"); + } - fprintf (e, " END\n"); + fprintf (e, " END\n"); + } fprintf (e, " END\n"); break; } diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 1f3c1cf74d..d620d8e987 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-10-11 Chris + + PR binutils/13051 + * binutils-all\windres\version.rsd: Regenerate. + * binutils-all\windres\version_cat.rsd: Regenerate. + * binutils-all\windres\version_mlang.rc: Add new test. + * binutils-all\windres\version_mlang.rsd: Likewise. + 2011-10-07 H.J. Lu * binutils-all/objdump.exp: Don't run dw2-decodedline.S on ia64. diff --git a/binutils/testsuite/binutils-all/windres/version.rsd b/binutils/testsuite/binutils-all/windres/version.rsd index 85dd5d3528..8ad479c122 100644 --- a/binutils/testsuite/binutils-all/windres/version.rsd +++ b/binutils/testsuite/binutils-all/windres/version.rsd @@ -1,7 +1,3 @@ - -version.res: file format binary - -Contents of section .data: 0000 00000000 20000000 ffff0000 ffff0000 .... ........... 0010 00000000 00000000 00000000 00000000 ................ 0020 ec020000 20000000 ffff1000 ffff0100 .... ........... @@ -12,9 +8,9 @@ Contents of section .data: 0070 00000100 01000000 00000100 01000000 ................ 0080 3f000000 00000000 04000000 01000000 ?............... 0090 00000000 00000000 00000000 4c020000 ............L... - 00a0 00005300 74007200 69006e00 67004600 ..S.t.r.i.n.g.F. + 00a0 01005300 74007200 69006e00 67004600 ..S.t.r.i.n.g.F. 00b0 69006c00 65004900 6e006600 6f000000 i.l.e.I.n.f.o... - 00c0 28020000 00003000 34003000 37003000 (.....0.4.0.7.0. + 00c0 28020000 01003000 34003000 37003000 (.....0.4.0.7.0. 00d0 34006500 34000000 32000900 01004300 4.e.4...2.....C. 00e0 6f006d00 70006100 6e007900 4e006100 o.m.p.a.n.y.N.a. 00f0 6d006500 00000000 62006900 6e007500 m.e.....b.i.n.u. @@ -48,7 +44,7 @@ Contents of section .data: 02b0 72000000 34000800 01005000 72006f00 r...4.....P.r.o. 02c0 64007500 63007400 56006500 72007300 d.u.c.t.V.e.r.s. 02d0 69006f00 6e000000 31002e00 30002e00 i.o.n...1...0... - 02e0 30002e00 31000000 44000000 00005600 0...1...D.....V. + 02e0 30002e00 31000000 44000000 01005600 0...1...D.....V. 02f0 61007200 46006900 6c006500 49006e00 a.r.F.i.l.e.I.n. 0300 66006f00 00000000 24000400 00005400 f.o.....$.....T. 0310 72006100 6e007300 6c006100 74006900 r.a.n.s.l.a.t.i. diff --git a/binutils/testsuite/binutils-all/windres/version_cat.rsd b/binutils/testsuite/binutils-all/windres/version_cat.rsd index 85dd5d3528..4e57512136 100644 --- a/binutils/testsuite/binutils-all/windres/version_cat.rsd +++ b/binutils/testsuite/binutils-all/windres/version_cat.rsd @@ -12,9 +12,9 @@ Contents of section .data: 0070 00000100 01000000 00000100 01000000 ................ 0080 3f000000 00000000 04000000 01000000 ?............... 0090 00000000 00000000 00000000 4c020000 ............L... - 00a0 00005300 74007200 69006e00 67004600 ..S.t.r.i.n.g.F. + 00a0 01005300 74007200 69006e00 67004600 ..S.t.r.i.n.g.F. 00b0 69006c00 65004900 6e006600 6f000000 i.l.e.I.n.f.o... - 00c0 28020000 00003000 34003000 37003000 (.....0.4.0.7.0. + 00c0 28020000 01003000 34003000 37003000 (.....0.4.0.7.0. 00d0 34006500 34000000 32000900 01004300 4.e.4...2.....C. 00e0 6f006d00 70006100 6e007900 4e006100 o.m.p.a.n.y.N.a. 00f0 6d006500 00000000 62006900 6e007500 m.e.....b.i.n.u. @@ -48,7 +48,7 @@ Contents of section .data: 02b0 72000000 34000800 01005000 72006f00 r...4.....P.r.o. 02c0 64007500 63007400 56006500 72007300 d.u.c.t.V.e.r.s. 02d0 69006f00 6e000000 31002e00 30002e00 i.o.n...1...0... - 02e0 30002e00 31000000 44000000 00005600 0...1...D.....V. + 02e0 30002e00 31000000 44000000 01005600 0...1...D.....V. 02f0 61007200 46006900 6c006500 49006e00 a.r.F.i.l.e.I.n. 0300 66006f00 00000000 24000400 00005400 f.o.....$.....T. 0310 72006100 6e007300 6c006100 74006900 r.a.n.s.l.a.t.i. diff --git a/binutils/testsuite/binutils-all/windres/version_mlang.rc b/binutils/testsuite/binutils-all/windres/version_mlang.rc new file mode 100644 index 0000000000..e796ca95d5 --- /dev/null +++ b/binutils/testsuite/binutils-all/windres/version_mlang.rc @@ -0,0 +1,43 @@ +#include "windows.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "binutils" + VALUE "FileDescription", "RC compiler." + VALUE "FileVersion", "1.0.0.1" + VALUE "InternalName", "windres.exe" + VALUE "LegalCopyright", "(c) FSF. All rights are reserved." + VALUE "OriginalFilename", "windres.exe" + VALUE "ProductName", "windows resource compiler" + VALUE "ProductVersion", "1.0.0.1" + END + BLOCK "041504b0" + BEGIN + VALUE "CompanyName", "binutils" + VALUE "FileDescription", "Kompilator RC." + VALUE "FileVersion", "1.0.0.1" + VALUE "InternalName", "windres.exe" + VALUE "LegalCopyright", "(c) FSF. Wszystkie prawa zastrzezone." + VALUE "OriginalFilename", "windres.exe" + VALUE "ProductName", "windows resource compiler" + VALUE "ProductVersion", "1.0.0.1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04b0, 0x0415, 0x04b0 + END +END diff --git a/binutils/testsuite/binutils-all/windres/version_mlang.rsd b/binutils/testsuite/binutils-all/windres/version_mlang.rsd new file mode 100644 index 0000000000..05ed4883f2 --- /dev/null +++ b/binutils/testsuite/binutils-all/windres/version_mlang.rsd @@ -0,0 +1,87 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 24050000 20000000 ffff1000 ffff0100 $... ........... + 0030 00000000 00000000 00000000 00000000 ................ + 0040 24053400 00005600 53005f00 56004500 $.4...V.S._.V.E. + 0050 52005300 49004f00 4e005f00 49004e00 R.S.I.O.N._.I.N. + 0060 46004f00 00000000 bd04effe 00000100 F.O............. + 0070 00000100 01000000 00000100 01000000 ................ + 0080 3f000000 00000000 04000000 01000000 ?............... + 0090 00000000 00000000 00000000 80040000 ................ + 00a0 01005300 74007200 69006e00 67004600 ..S.t.r.i.n.g.F. + 00b0 69006c00 65004900 6e006600 6f000000 i.l.e.I.n.f.o... + 00c0 28020000 01003000 34003000 39003000 (.....0.4.0.9.0. + 00d0 34006200 30000000 32000900 01004300 4.b.0...2.....C. + 00e0 6f006d00 70006100 6e007900 4e006100 o.m.p.a.n.y.N.a. + 00f0 6d006500 00000000 62006900 6e007500 m.e.....b.i.n.u. + 0100 74006900 6c007300 00000000 42000d00 t.i.l.s.....B... + 0110 01004600 69006c00 65004400 65007300 ..F.i.l.e.D.e.s. + 0120 63007200 69007000 74006900 6f006e00 c.r.i.p.t.i.o.n. + 0130 00000000 52004300 20006300 6f006d00 ....R.C. .c.o.m. + 0140 70006900 6c006500 72002e00 00000000 p.i.l.e.r....... + 0150 30000800 01004600 69006c00 65005600 0.....F.i.l.e.V. + 0160 65007200 73006900 6f006e00 00000000 e.r.s.i.o.n..... + 0170 31002e00 30002e00 30002e00 31000000 1...0...0...1... + 0180 38000c00 01004900 6e007400 65007200 8.....I.n.t.e.r. + 0190 6e006100 6c004e00 61006d00 65000000 n.a.l.N.a.m.e... + 01a0 77006900 6e006400 72006500 73002e00 w.i.n.d.r.e.s... + 01b0 65007800 65000000 68002200 01004c00 e.x.e...h."...L. + 01c0 65006700 61006c00 43006f00 70007900 e.g.a.l.C.o.p.y. + 01d0 72006900 67006800 74000000 28006300 r.i.g.h.t...(.c. + 01e0 29002000 46005300 46002e00 20004100 ). .F.S.F... .A. + 01f0 6c006c00 20007200 69006700 68007400 l.l. .r.i.g.h.t. + 0200 73002000 61007200 65002000 72006500 s. .a.r.e. .r.e. + 0210 73006500 72007600 65006400 2e000000 s.e.r.v.e.d..... + 0220 40000c00 01004f00 72006900 67006900 @.....O.r.i.g.i. + 0230 6e006100 6c004600 69006c00 65006e00 n.a.l.F.i.l.e.n. + 0240 61006d00 65000000 77006900 6e006400 a.m.e...w.i.n.d. + 0250 72006500 73002e00 65007800 65000000 r.e.s...e.x.e... + 0260 54001a00 01005000 72006f00 64007500 T.....P.r.o.d.u. + 0270 63007400 4e006100 6d006500 00000000 c.t.N.a.m.e..... + 0280 77006900 6e006400 6f007700 73002000 w.i.n.d.o.w.s. . + 0290 72006500 73006f00 75007200 63006500 r.e.s.o.u.r.c.e. + 02a0 20006300 6f006d00 70006900 6c006500 .c.o.m.p.i.l.e. + 02b0 72000000 34000800 01005000 72006f00 r...4.....P.r.o. + 02c0 64007500 63007400 56006500 72007300 d.u.c.t.V.e.r.s. + 02d0 69006f00 6e000000 31002e00 30002e00 i.o.n...1...0... + 02e0 30002e00 31000000 34020000 01003000 0...1...4.....0. + 02f0 34003100 35003000 34006200 30000000 4.1.5.0.4.b.0... + 0300 32000900 01004300 6f006d00 70006100 2.....C.o.m.p.a. + 0310 6e007900 4e006100 6d006500 00000000 n.y.N.a.m.e..... + 0320 62006900 6e007500 74006900 6c007300 b.i.n.u.t.i.l.s. + 0330 00000000 46000f00 01004600 69006c00 ....F.....F.i.l. + 0340 65004400 65007300 63007200 69007000 e.D.e.s.c.r.i.p. + 0350 74006900 6f006e00 00000000 4b006f00 t.i.o.n.....K.o. + 0360 6d007000 69006c00 61007400 6f007200 m.p.i.l.a.t.o.r. + 0370 20005200 43002e00 00000000 30000800 .R.C.......0... + 0380 01004600 69006c00 65005600 65007200 ..F.i.l.e.V.e.r. + 0390 73006900 6f006e00 00000000 31002e00 s.i.o.n.....1... + 03a0 30002e00 30002e00 31000000 38000c00 0...0...1...8... + 03b0 01004900 6e007400 65007200 6e006100 ..I.n.t.e.r.n.a. + 03c0 6c004e00 61006d00 65000000 77006900 l.N.a.m.e...w.i. + 03d0 6e006400 72006500 73002e00 65007800 n.d.r.e.s...e.x. + 03e0 65000000 70002600 01004c00 65006700 e...p.&...L.e.g. + 03f0 61006c00 43006f00 70007900 72006900 a.l.C.o.p.y.r.i. + 0400 67006800 74000000 28006300 29002000 g.h.t...(.c.). . + 0410 46005300 46002e00 20005700 73007a00 F.S.F... .W.s.z. + 0420 79007300 74006b00 69006500 20007000 y.s.t.k.i.e. .p. + 0430 72006100 77006100 20007a00 61007300 r.a.w.a. .z.a.s. + 0440 74007200 7a006500 7a006f00 6e006500 t.r.z.e.z.o.n.e. + 0450 2e000000 40000c00 01004f00 72006900 ....@.....O.r.i. + 0460 67006900 6e006100 6c004600 69006c00 g.i.n.a.l.F.i.l. + 0470 65006e00 61006d00 65000000 77006900 e.n.a.m.e...w.i. + 0480 6e006400 72006500 73002e00 65007800 n.d.r.e.s...e.x. + 0490 65000000 54001a00 01005000 72006f00 e...T.....P.r.o. + 04a0 64007500 63007400 4e006100 6d006500 d.u.c.t.N.a.m.e. + 04b0 00000000 77006900 6e006400 6f007700 ....w.i.n.d.o.w. + 04c0 73002000 72006500 73006f00 75007200 s. .r.e.s.o.u.r. + 04d0 63006500 20006300 6f006d00 70006900 c.e. .c.o.m.p.i. + 04e0 6c006500 72000000 34000800 01005000 l.e.r...4.....P. + 04f0 72006f00 64007500 63007400 56006500 r.o.d.u.c.t.V.e. + 0500 72007300 69006f00 6e000000 31002e00 r.s.i.o.n...1... + 0510 30002e00 30002e00 31000000 48000000 0...0...1...H... + 0520 01005600 61007200 46006900 6c006500 ..V.a.r.F.i.l.e. + 0530 49006e00 66006f00 00000000 28000800 I.n.f.o.....(... + 0540 00005400 72006100 6e007300 6c006100 ..T.r.a.n.s.l.a. + 0550 74006900 6f006e00 00000000 0904b004 t.i.o.n......... + 0560 1504b004 .... diff --git a/binutils/windint.h b/binutils/windint.h index eed8f790fa..0a7589954c 100644 --- a/binutils/windint.h +++ b/binutils/windint.h @@ -944,6 +944,18 @@ struct __attribute__ ((__packed__)) bin_fixed_versioninfo }; #define BIN_FIXED_VERSIONINFO_SIZE 52 +/* A list of string version information. */ + +typedef struct rc_ver_stringtable +{ + /* Next item. */ + struct rc_ver_stringtable *next; + /* Language. */ + unichar *language; + /* Strings. */ + struct rc_ver_stringinfo *strings; +} rc_ver_stringtable; + /* A list of variable version information. */ typedef struct rc_ver_info @@ -957,10 +969,8 @@ typedef struct rc_ver_info /* StringFileInfo data. */ struct { - /* Language. */ - unichar *language; - /* Strings. */ - struct rc_ver_stringinfo *strings; + /* String tables. */ + struct rc_ver_stringtable *stringtables; } string; /* VarFileInfo data. */ struct diff --git a/binutils/windres.h b/binutils/windres.h index 3e65886c81..b7bd65621d 100644 --- a/binutils/windres.h +++ b/binutils/windres.h @@ -1,5 +1,5 @@ /* windres.h -- header file for windres program. - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007 + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2011 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Rewritten by Kai Tietz, Onevision. @@ -109,7 +109,8 @@ extern void define_user_data (rc_res_id, rc_res_id, const rc_res_res_info *, rc_ extern void define_toolbar (rc_res_id, rc_res_res_info *, rc_uint_type ,rc_uint_type ,rc_toolbar_item *); extern void define_user_file (rc_res_id, rc_res_id, const rc_res_res_info *, const char *); extern void define_versioninfo (rc_res_id, rc_uint_type, rc_fixed_versioninfo *, rc_ver_info *); -extern rc_ver_info *append_ver_stringfileinfo (rc_ver_info *, const char *, rc_ver_stringinfo *); +extern rc_ver_info *append_ver_stringfileinfo (rc_ver_info *, rc_ver_stringtable *); +extern rc_ver_stringtable *append_ver_stringtable (rc_ver_stringtable *, const char *, rc_ver_stringinfo *); extern rc_ver_info *append_ver_varfileinfo (rc_ver_info *, const unichar *, rc_ver_varinfo *); extern rc_ver_stringinfo *append_verval (rc_ver_stringinfo *, const unichar *, const unichar *); extern rc_ver_varinfo *append_vertrans (rc_ver_varinfo *, rc_uint_type, rc_uint_type); -- cgit v1.2.1