[Bug gold/20963] New: __executable_start isn't defined when linking executable against .so needing it, but ld does

2016-12-13 Thread mpercy at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20963

Bug ID: 20963
   Summary: __executable_start isn't defined when linking
executable against .so needing it, but ld does
   Product: binutils
   Version: 2.26
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: mpercy at gmail dot com
CC: ian at airs dot com
  Target Milestone: ---

Gold does not generate __executable_start if it is needed by a shared library
being linked to an executable. This results in the following error message when
running the executable:

  undefined symbol: __executable_start (libfoo.so)

ld correctly generates the symbol in this case.

Support matrix for when __executable_start is defined:

 | ld  | gold
-+-+-
static link  | yes | yes
dynamic link | yes | no

I wrote a reproducing test case and posted it here: 

https://github.com/mpercy/executable_start

Observed on the following version of gold on Ubuntu 16.04 (xenial):

$ gold --version
GNU gold (GNU Binutils for Ubuntu 2.26.1) 1.11
Copyright (C) 2015 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) a later version.
This program has absolutely no warranty.

-- 
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/20963] __executable_start isn't defined when linking executable against .so needing it, but ld does

2016-12-13 Thread mpercy at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20963

--- Comment #1 from Mike Percy  ---
Somewhat related to, but not a dup of bug 14525

-- 
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/20963] __executable_start isn't defined when linking executable against .so needing it, but ld does

2016-12-13 Thread mpercy at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20963

--- Comment #2 from Mike Percy  ---
Upon further investigation by some others, this might not be a bug in gold, but
a bug in ld.so (which running ldd is showing).

nm --dynamic shows the symbol is defined (although it's defined differently to
how ld.bfd does it):

bfd: 
0759 T __etext
 U __executable_start

gold:
0858 A __etext
 A __executable_start

ld.so copes fine with __etext, but chokes on __executable_start.

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