[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  changed:

   What|Removed |Added

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

--- Comment #1 from Nick Clifton  ---
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  ---
Created attachment 7759
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7759&action=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  ---
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/17312] ld tests "EH Frame merge" and "ld-elf/eh5" failed on aarch64

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

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||nickc at redhat dot com
 Resolution|--- |FIXED

--- Comment #1 from Nick Clifton  ---
Hi Amker,

  I have checked in a patch to fix this.

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/17312] ld tests "EH Frame merge" and "ld-elf/eh5" failed on aarch64

2014-08-26 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17312

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
   via  2836a869c4607fd1200b928986092ffed20c1d32 (commit)
  from  5575639b8dbb2a04087c3bef0b10f182da48ad35 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2836a869c4607fd1200b928986092ffed20c1d32

commit 2836a869c4607fd1200b928986092ffed20c1d32
Author: Nick Clifton 
Date:   Tue Aug 26 15:06:49 2014 +0100

Fix linker testsuite failures for Aarch64.
Resolves PR 17312

* ld-aarch64/eh-frame-foo.s: Use 8-byte offset for X30.
* ld-aarch64/eh-frame-bar.s: Likewise.
* ld-aarch64/eh-frame.d: Updated to match current readelf output.
* ld-elf/eh5.d: Allow any register names.

---

Summary of changes:
 ld/testsuite/ChangeLog |7 +++
 ld/testsuite/ld-aarch64/eh-frame-bar.s |2 +-
 ld/testsuite/ld-aarch64/eh-frame-foo.s |2 +-
 ld/testsuite/ld-aarch64/eh-frame.d |   72 
 ld/testsuite/ld-elf/eh5.d  |   22 +-
 5 files changed, 56 insertions(+), 49 deletions(-)

-- 
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/17306] ld aborts when linking with --just-symbols

2014-08-26 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17306

--- Comment #4 from H.J. Lu  ---
(In reply to Fam Zheng from comment #2)
> Created attachment 7758 [details]
> Reproducer
> 

Please provide a self-contained testcase.  I don't have all libraries
this one needed.

-- 
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/17306] ld aborts when linking with --just-symbols

2014-08-26 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17306

--- Comment #5 from H.J. Lu  ---
(In reply to Fam Zheng from comment #3)
> (In reply to H.J. Lu from comment #1)
> > BTW, you can try -Wl,-u,qmp_query_uuid for your original problem.
> 
> Yes it does help, Thanks. But there are a few more symbols than
> qmp_query_uuid that need to be pulled in from libqemustub.a, and more will
> come in the future, so special casing several limited symbols with
> -Wl,-u,foo is not a good solution compared to --just-symbols.

--just-symbols may not do what you wanted:

'--just-symbols=FILENAME'
 Read symbol names and their addresses from FILENAME, but do not
 relocate it or include it in the output.  This allows your output
 file to refer symbolically to absolute locations of memory defined
 in other programs.  You may use this option more than once.

You can use

for s in $(nm -u iscsi.o | awk '{ print $2 }'); do echo "-Wl,-u,$s"; done

to generate all -Wl,u,xxx.

-- 
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/17313] New: --just-symbols= leads to discarded dynamic section

2014-08-26 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17313

Bug ID: 17313
   Summary: --just-symbols= leads to discarded dynamic section
   Product: binutils
   Version: 2.25 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: hjl.tools at gmail dot com

[hjl@gnu-6 lea-2]$ cat lea1.s 
.data
.globl foo
foo:
.quad -1
.text
.globl_start
.type_start, @function
_start:
movqfoo@GOTPCREL(%rip), %rax
[hjl@gnu-6 lea-2]$ cat lea2.s 
.text
.globlbar
.typebar, @function
bar:
movqfoo@GOTPCREL(%rip), %rax
movqfoo@GOTPCREL(%rip), %rax
[hjl@gnu-6 lea-2]$ make
gcc -c  -o lea2.o lea2.s
gcc -c  -o lea1.o lea1.s
./ld -m elf_x86_64 --just-symbols=lea2.o -Bsymbolic -shared -o libfoo.so lea1.o
./ld: discarded output section: `.got.plt'
make: *** [libfoo.so] Error 1
[hjl@gnu-6 lea-2]$ 

elf_link_add_object_symbols calls  _bfd_elf_link_create_dynamic_sections
with input which will be discarded later.

-- 
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/17306] ld aborts when linking with --just-symbols

2014-08-26 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17306

H.J. Lu  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #6 from H.J. Lu  ---
A small testcase:

[hjl@gnu-6 pr17306]$ cat foo.s
.data
.globl foo
foo:
.quad -1
.text
.globl_start
.type_start, @function
_start:
pushqfoo@GOTPCREL(%rip)
[hjl@gnu-6 pr17306]$ cat lea.s 
.text
.globlbar
.typebar, @function
bar:
movqfoo@GOTPCREL(%rip), %rax
[hjl@gnu-6 pr17306]$ make
gcc -c  -o lea.o lea.s
gcc -c  -o foo.o foo.s
./ld -m elf_x86_64 --just-symbols=lea.o -Bsymbolic -shared -o libfoo.so foo.o
./ld: BFD (GNU Binutils) 2.24.51.20140826 internal error, aborting at
/export/gnu/import/git/sources/binutils-gdb/bfd/elf64-x86-64.c line 3824 in
elf_x86_64_relocate_section

./ld: Please report this bug.

make: *** [libfoo.so] Error 1
[hjl@gnu-6 pr17306]$

-- 
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/17184] windres: Subtle incompatibility with Windows 8/8.1

2014-08-26 Thread mity at morous dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=17184

--- Comment #3 from mity at morous dot org ---
Thanks for feedback, Nick. I'll get back to this when I come back from my
holiday, in mid September.

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