WindRes screws up RC output

2011-10-14 Thread Josh Ventura

Hello, all you happy people;

I filed a bug on the MinGW SourceForge page, and was sent here, or to 
the vicinity of here. Problem is, windres.exe is generating invalid RC 
output.


Let me clarify: My project is on the large side, and is designed to be 
extensible. That said, a lot of systems can be changed out or removed, 
and some of said systems need their own RC file (for packing DLLs or 
including dialogs, for instance).


The bottom line is, I have multiple RC files to link in, but MinGW does 
not support this. So instead of building COFF objects up front, I 
instruct it to recode the RC file such that it contains all resources in 
itself, then I generate a central resource file that #includes all of 
the generated files.


The issue is that when asked to produce an RC file, it reads a perfectly 
valid input file, then exports a file containing syntax errors.


I will add that compiling the files as individual COFF objects works 
fine (this is what I tried originally, before I realized that multiple 
resource objects are not correctly linked). It is when asked to bind all 
the resources into a new RC file that it goofs up.


Technical information:

Input line:
EDITTEXT 12, 5, 43, 174, 15, ES_AUTOHSCROLL | ES_LEFT | WS_BORDER | 
WS_TABSTOP

Build command:
windres -o .eobjs/Windows/Windows/Run/Widget_Systems/Win32/res.rc 
-i Widget_Systems/Win32/res.rc -O rc

Output line:
EDITTEXT "", 12, 5, 43, 174, 15, 0x50810080

Full input file:
http://pastebin.com/qbEbgGM2
Full output file:
http://pastebin.com/pezHGLqy

Other input files:
manifest.xml: http://pastebin.com/vGi6SJcF

Implications:
The output format is invalid; the string causes windres to throw a 
syntax error later on when requested to build a COFF.


OS and Version Information:
Windows 7, x64

*C:\Users\Josh>ld -v*
GNU ld (GNU Binutils) 2.21.53.20110804

*C:\Users\Josh>windres --version*
GNU windres (GNU Binutils) 2.21.53.20110804
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later 
version.

This program has absolutely no warranty.
*
C:\Users\Josh>gcc -v*
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.1/configure 
--enable-languages=c,c++,fortran,objc,ob
j-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared 
--enable-libgomp -
-disable-win32-registry --enable-libstdcxx-debug 
--enable-version-specific-runti

me-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.1 (GCC)


If you could suggest a workaround, please do so. I have managed to 
isolate the issue in my project such that it will, at present, not 
inhibit typical users. However, it is limiting forward progress for 
non-developers; my developers can simply correct the output themselves 
by removing the erroneous empty string it generates.


Thanks much,
Josh @ Dreamland
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13254] -z text warning breaks gcc testsuite on Solaris

2011-10-14 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://sourceware.org/bugzilla/show_bug.cgi?id=13254

--- Comment #3 from Rainer Orth  2011-10-14 
11:41:38 UTC ---
Sorry for the delay: the patch works like a charm.

Thanks.
Rainer

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13255] Wrong `local symbol is referenced by DSO' warnings on Solaris

2011-10-14 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://sourceware.org/bugzilla/show_bug.cgi?id=13255

--- Comment #3 from Rainer Orth  2011-10-14 
11:46:00 UTC ---
> --- Comment #2 from H.J. Lu  2011-10-10 15:55:01 
> UTC ---
> Please try the current binutils 2.22 branch.

Sorry for the delay: I've now re-bootstrapped gcc mainline as of
20111007 with gas/gld 2.21.90.20111007 and Alan's patch for PR ld/13254.

Works just fine, with only two testsuite regressions compared to 2.21.1:

FAIL: g++.dg/init/cleanup3.C scan-assembler-not _tcf
FAIL: g++.old-deja/g++.other/init5.C execution test

With gld 2.21.1, the cxa_atexit effective-target test fails, thus the
first test above is UNSUPPORTED and the second XFAIL.   With 2.21.90,
the cxa_atexit test suddenly passes, although Solaris 11 doesn't have
__cxa_atexit.

Rainer

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


Re: WindRes screws up RC output

2011-10-14 Thread Ian Lance Taylor
Josh Ventura  writes:

> I filed a bug on the MinGW SourceForge page, and was sent here, or to
> the vicinity of here. Problem is, windres.exe is generating invalid RC
> output.

Probably the best next step would be to file a bug report against the
GNU binutils at http://sourceware.org/bugzilla/ .

Ian

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13297] New: windres.exe is generating invalid RC output.

2011-10-14 Thread joshv10 at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13297

 Bug #: 13297
   Summary: windres.exe is generating invalid RC output.
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: josh...@gmail.com
Classification: Unclassified


windres.exe is generating invalid RC output.

Let me clarify: My project is on the large side, and is designed to be
extensible. That said, a lot of systems can be changed out or removed, and some
of said systems need their own RC file (for packing DLLs or including dialogs,
for instance).

The bottom line is, I have multiple RC files to link in, but MinGW does not
support this. So instead of building COFF objects up front, I instruct it to
recode the RC file such that it contains all resources in itself, then I
generate a central resource file that #includes all of the generated files.

The issue is that when asked to produce an RC file, it reads a perfectly valid
input file, then exports a file containing syntax errors.

I will add that compiling the files as individual COFF objects works fine (this
is what I tried originally, before I realized that multiple resource objects
are not correctly linked). It is when asked to bind all the resources into a
new RC file that it goofs up.

Technical information:

Input line:
EDITTEXT 12, 5, 43, 174, 15, ES_AUTOHSCROLL | ES_LEFT | WS_BORDER |
WS_TABSTOP
Build command:
windres -o .eobjs/Windows/Windows/Run/Widget_Systems/Win32/res.rc -i
Widget_Systems/Win32/res.rc -O rc
Output line:
EDITTEXT "", 12, 5, 43, 174, 15, 0x50810080

Full input file:
http://pastebin.com/qbEbgGM2
Full output file:
http://pastebin.com/pezHGLqy

Other input files:
manifest.xml: http://pastebin.com/vGi6SJcF

Implications:
The output format is invalid; the string causes windres to throw a syntax error
later on when requested to build a COFF.

OS and Version Information:
Windows 7, x64

C:\Users\Josh>ld -v
GNU ld (GNU Binutils) 2.21.53.20110804

C:\Users\Josh>windres --version
GNU windres (GNU Binutils) 2.21.53.20110804
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

C:\Users\Josh>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.1/configure
--enable-languages=c,c++,fortran,objc,ob
j-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp
-
-disable-win32-registry --enable-libstdcxx-debug
--enable-version-specific-runti
me-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.1 (GCC)


If you could suggest a workaround, please do so. I have managed to isolate the
issue in my project such that it will, at present, not inhibit typical users.
However, it is limiting forward progress for non-developers; my developers can
simply correct the output themselves by removing the erroneous empty string it
generates.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13298] New: ar --plugin doesn't work on mixed IR/non-IR input

2011-10-14 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13298

 Bug #: 13298
   Summary: ar --plugin doesn't work on mixed  IR/non-IR input
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: hjl.to...@gmail.com
Classification: Unclassified


[hjl@gnu-6 slim-1]$ cat main.c
extern int bar ();

int
main ()
{
  return bar ();
}
[hjl@gnu-6 slim-1]$ cat xxx.c
int
xxx ()
{
  return 0;
}
[hjl@gnu-6 slim-1]$ cat bar.c
extern int xxx ();

int bar (void)
{
  return xxx ();
}
[hjl@gnu-6 slim-1]$ make
/usr/gcc-4.7.0-x32/bin/gcc-c -o main.o main.c
/usr/gcc-4.7.0-x32/bin/gcc -flto -c -o xxx.o xxx.c
/usr/gcc-4.7.0-x32/bin/gcc-c -o bar.o bar.c
ld -r -o rel.o xxx.o bar.o
ar --plugin
/usr/gcc-4.7.0-x32/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/liblto_plugin.so
-rcsD lib.a rel.o
/usr/gcc-4.7.0-x32/bin/gcc -flto -o x main.o lib.a
main.o: In function `main':
main.c:(.text+0xa): undefined reference to `bar'
collect2: error: ld returned 1 exit status
make: *** [x] Error 1
[hjl@gnu-6 slim-1]$ 
..

Without --plugin, it works fine:

[hjl@gnu-6 slim-1]$ rm lib.a
[hjl@gnu-6 slim-1]$ make
ar -rcsD lib.a rel.o
/usr/gcc-4.7.0-x32/bin/gcc -flto -o x main.o lib.a
[hjl@gnu-6 slim-1]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13298] --plugin doesn't work on mixed IR/non-IR input

2011-10-14 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13298

H.J. Lu  changed:

   What|Removed |Added

Summary|ar --plugin doesn't work on |--plugin doesn't work on
   |mixed  IR/non-IR input  |mixed  IR/non-IR input

--- Comment #1 from H.J. Lu  2011-10-14 19:00:30 
UTC ---
The problem is ar/nm doesn't see symbols in .gnu_object_only section.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13298] ar --plugin doesn't work on mixed IR/non-IR input

2011-10-14 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13298

H.J. Lu  changed:

   What|Removed |Added

Summary|--plugin doesn't work on|ar --plugin doesn't work on
   |mixed  IR/non-IR input  |mixed  IR/non-IR input

--- Comment #2 from H.J. Lu  2011-10-14 19:02:56 
UTC ---
AR ignores the normal symbol table.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13245] PREVAILING_DEF reported too often.

2011-10-14 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13245

--- Comment #13 from Octoploid  2011-10-15 
06:44:54 UTC ---
Any update on this?
The issue just got fixed on the bfd side:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elflink.c.diff?cvsroot=src&r1=1.423&r2=1.424

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils