[Bug ld/22220] BFD linker plugin wrongly marks symbols as PREVAILING_DEF_IRONLY

2017-09-28 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=0

--- Comment #10 from Martin Liska  ---
Great, I considered symbol versioning is somehow responsible for that.
Thank you both for help.

-- 
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/22220] BFD linker plugin wrongly marks symbols as PREVAILING_DEF_IRONLY

2017-09-28 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=0

--- Comment #11 from H.J. Lu  ---
The updated patch is posted at

https://sourceware.org/ml/binutils/2017-09/msg00338.html

-- 
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/22221] add --no-dynamic-linker option

2017-09-28 Thread markus at trippelsdorf dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=1

--- Comment #4 from Markus Trippelsdorf  ---
(In reply to Cary Coutant from comment #3)
> I'm not sure I understand exactly what this option is for. If "-static -pie"
> will produce a static-pie executable, wouldn't such an executable already
> lack a dynamic linker? That's (part of) what -static does.

The problem is that when both "-static -pie" are used -pie currently forces
PT_INTERP to be set.

Generally "-static -pie" could be thought of as a hardened -static.

 % cat aslr.c
#include 

static void foo() {}
static int bar = 5;

int main() {
  int baz = 5;
  printf("function: %p, library function: %p, data: %p, stack: %p\n", foo,
 &printf, &bar, &baz);
}

(gcc trunk supports -static-pie, glibc with PIE libc.a is needed)   
 ~ % gcc -fuse-ld=bfd -static-pie -fPIE aslr.c

 ~ % file a.out
a.out: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically
linked, for GNU/Linux 4.10.0, with debug_info, not stripped 
 ~ % ldd ./a.out
statically linked

 ~ % ./a.out
function: 0x7f1c3fd130e5, library function: 0x7f1c3fd21b00, data:
0x7f1c3ffaf070, stack: 0x7ffeb1d24c0c   
 ~ % ./a.out
function: 0x7f137df070e5, library function: 0x7f137df15b00, data:
0x7f137e1a3070, stack: 0x7ffeeeb59eac

> What does the option have to do with the PT_PHDR header and segment? From
> the name & description, it sounds like it's intended to suppress the
> PT_INTERP header.

ld.bfd outputs no PT_PHDR header with -static-pie, so I just tried to copy its
behavior.

> If the option is also supposed to suppress the PT_PHDR header, shouldn't we
> issue a warning or an error if this option is used and we see a PHDRS clause
> in the linker script?

Probably yes. But first we have to get the basic functionality working.

(Also the labels for the output from comment 2 are wrong.
They should be the other way round. ld.bfd output is ld.gold output and vice
versa. Sorry.)

-- 
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/22220] BFD linker plugin wrongly marks symbols as PREVAILING_DEF_IRONLY

2017-09-28 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=0

--- Comment #12 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1a3b5c34fe371f618402f811a981839c9191ff9f

commit 1a3b5c34fe371f618402f811a981839c9191ff9f
Author: Alan Modra 
Date:   Thu Sep 28 17:11:38 2017 +0930

PR0, BFD linker wrongly marks symbols as PREVAILING_DEF_IRONLY

non_ir_ref_dynamic wasn't being set in the case where we have a
versioned dynamic symbol definition with a non-versioned matching IR
symbol.

bfd/
PR 0
* elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
a case where plugin_notice isn't called.
ld/
* testsuite/ld-plugin/pr0.h,
* testsuite/ld-plugin/pr0lib.cc,
* testsuite/ld-plugin/pr0lib.ver,
* testsuite/ld-plugin/pr0main.cc: New test.
* testsuite/ld-plugin/lto.exp: Run it.

-- 
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/14918] linking with -flto always links in libgcc:s.so

2017-09-28 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=14918

--- Comment #6 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=231ca753239211b72eb761593083a0ee859274e7

commit 231ca753239211b72eb761593083a0ee859274e7
Author: Nick Clifton 
Date:   Thu Sep 28 11:33:20 2017 +0100

Skip the PR 14918 linker test for ARM targets.

 I am applying a patch that has been lying around in the Fedora
  binutils sources for a while.  It skips the PR14918 linker test for
  ARM based targets.  This test checks that libgcc is not included in a
  link of an empty executable.  This works for most targets, but on the
  ARM the crt1.o startup code calls __libc_csu_init which is in
  /usr/lib/libc_nonshared.a(elf-init.oS).  This in turn needs
  __aeabi_unwind_cpp_pr0@@GCC_3.5 which is provided by libgcc_s.so.1,
  and so the test fails.

-- 
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/22220] BFD linker plugin wrongly marks symbols as PREVAILING_DEF_IRONLY

2017-09-28 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=0

--- Comment #14 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_28-branch branch has been updated by Alan Modra
:

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

commit ce94efcee97180303d98ce96e40c9bc45f405cee
Author: Alan Modra 
Date:   Thu Sep 28 17:11:38 2017 +0930

PR0, BFD linker wrongly marks symbols as PREVAILING_DEF_IRONLY

non_ir_ref_dynamic wasn't being set in the case where we have a
versioned dynamic symbol definition with a non-versioned matching IR
symbol.

bfd/
PR 0
* elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
a case where plugin_notice isn't called.
ld/
* testsuite/ld-plugin/pr0.h,
* testsuite/ld-plugin/pr0lib.cc,
* testsuite/ld-plugin/pr0lib.ver,
* testsuite/ld-plugin/pr0main.cc: New test.
* testsuite/ld-plugin/lto.exp: Run it.

(cherry picked from commit 1a3b5c34fe371f618402f811a981839c9191ff9f)

-- 
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/22220] BFD linker plugin wrongly marks symbols as PREVAILING_DEF_IRONLY

2017-09-28 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=0

--- Comment #13 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_29-branch branch has been updated by Alan Modra
:

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

commit a45d8fd5ffbfd9449d1e149aa396fb86513b
Author: Alan Modra 
Date:   Thu Sep 28 17:11:38 2017 +0930

PR0, BFD linker wrongly marks symbols as PREVAILING_DEF_IRONLY

non_ir_ref_dynamic wasn't being set in the case where we have a
versioned dynamic symbol definition with a non-versioned matching IR
symbol.

bfd/
PR 0
* elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
a case where plugin_notice isn't called.
ld/
* testsuite/ld-plugin/pr0.h,
* testsuite/ld-plugin/pr0lib.cc,
* testsuite/ld-plugin/pr0lib.ver,
* testsuite/ld-plugin/pr0main.cc: New test.
* testsuite/ld-plugin/lto.exp: Run it.

(cherry picked from commit 1a3b5c34fe371f618402f811a981839c9191ff9f)

-- 
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/22220] BFD linker plugin wrongly marks symbols as PREVAILING_DEF_IRONLY

2017-09-28 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=0

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.30

--- Comment #15 from Alan Modra  ---
Fixed master, binutils-2.29 and binutils-2.28.  binutils-2.28 prerequisite to
make the patch apply cleanly was to cherry-pick 077c11e8 59fa66c538 4070765b
bc4e12de

-- 
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/14918] linking with -flto always links in libgcc_s.so

2017-09-28 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=14918

Andreas Schwab  changed:

   What|Removed |Added

Summary|linking with -flto always   |linking with -flto always
   |links in libgcc:s.so|links in libgcc_s.so

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


internal error in gold with unterminated library group

2017-09-28 Thread Benjamin Peterson
This invalid command line gives an internal error rather than a nice
message:
$ gold --start-lib
gold: internal error in set_thread_count, at ../../gold/workqueue.cc:110

I sent a patch for this a few weeks ago:
https://sourceware.org/ml/binutils/2017-09/msg00024.html

Regards,
Benjamin

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