bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/24718] Unresolved weak dependency on a versioned symbol should n


From: fweimer at redhat dot com
Subject: [Bug ld/24718] Unresolved weak dependency on a versioned symbol should not prevent a program from running
Date: Mon, 24 Jun 2019 06:53:27 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24718

--- Comment #12 from Florian Weimer <fweimer at redhat dot com> ---
<https://www.akkadia.org/drepper/symbol-versioning> says this:

  vna_flags
   Bitmask of flags.  Currently the following are defined:

     VER_FLG_WEAK       the reference to this version is weak.

I believe this is what is implemented in glibc, but it's not bean tested so far
because binutils doesn't set this flag.  It should be quite safe to introduce
this feature in binutils (obviously for GNU only).

The Solaris documentation is not helpful at all in this case because our
implementation is so very different.  Based on reading that documentation,
Solaris does not bind individual symbols to versions, only shared object
dependencies as a whole.  Therefore, the problem that weak symbol references
try to solve in Ulrich's approach does not actually arise on Solaris.  Instead,
you can just instruct the link editor to omit certain symbol version references
from the resulting binary, keep a weak (unversioned) symbol reference, and
apply a run-time check, as with any weak symbol.  Since it is not possible to
define multiple symbol versions for the same symbol name on Solaris,
restricting the set of bound symbol versions at static link time is safe.  (In
the GNU implementation, this is unsafe because different versioned symbols can
require different declarations and have different behavior in general, so
deferring this decision to the link editor does not work.)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]