[Bug ld/17196] .rsrc section from archive members are ignored (all Windows targets)

2022-08-03 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17196

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |NOTABUG
 Status|ASSIGNED|RESOLVED

--- Comment #4 from Alan Modra  ---
.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/17196] .rsrc section from archive members are ignored (all Windows targets)

2014-08-26 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17196

Nick Clifton nickc at redhat dot com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||nickc at redhat dot com

--- Comment #1 from Nick Clifton nickc at redhat dot com ---
Hi Benjamin,

  This is not a bug.  It is a feature, or mis-feature if you prefer.  The
problem is that the resource.o file in the resource.a archive only contains a
.rsrc section.  It does not contain any symbols.  The linker only pulls object
files out of an archive if they contain symbols that are needed by other
objects in the link.  So when you link rsrcbug.o with resource.a there are no
unresolved symbols in rsrcbug.o and so nothing is pulled out of the archive.

  There are a couple of possible workarounds for this problem:

  * You could like with --whole-archive added before resource.a.
This will force the linker to include the resource.o file even 
though nothing references it.  Ie:

  i686-pc-mingw32-gcc -m32 -mwin32 -mwindows -o rsrcbug-failed.exe \
   -Wl,--whole-archive rsrcbug.o resource.a -Wl,--no-whole-archive

Of course this does negate one of the benefits of using archives - 
namely that normally only the files that your program needs are 
extracted from the library.

  * You could add a symbol to resource.o and then reference this symbol 
from rsrcbug.o.  See the uploaded variation on your test archive 
for an example of how this can be done.

Cheers
  Nick

-- 
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/17196] .rsrc section from archive members are ignored (all Windows targets)

2014-08-26 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17196

--- Comment #2 from Nick Clifton nickc at redhat dot com ---
Created attachment 7759
  -- https://sourceware.org/bugzilla/attachment.cgi?id=7759action=edit
Modified test case that shows how to use a symbolic workaround

-- 
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/17196] .rsrc section from archive members are ignored (all Windows targets)

2014-08-26 Thread sashipa.ben at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17196

--- Comment #3 from Benjamin Gerard sashipa.ben at gmail dot com ---
It makes perfect sense.

I'll see which workaround suit my case better.

Thank you for your time and sorry for the false alert.

Cheers,
 Ben

-- 
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/17196] .rsrc section from archive members are ignored (all Windows targets)

2014-07-24 Thread sashipa.ben at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17196

Benjamin Gerard sashipa.ben at gmail dot com changed:

   What|Removed |Added

 Target||*-*-mingw32 *-pc-cygwin
 CC||sashipa.ben at gmail dot com

-- 
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