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: carlos 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 00:51:21 +0000

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

--- Comment #9 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Paul Pluzhnikov from comment #8)
> (In reply to Florian Weimer from comment #6)
> 
> > I would say this is a static link editor limitation.  It has to mark symbol
> > versions as weak if they are only referenced by weak symbols.
> 
> Ok, I'll update product to "binutils".

Again, I'll comment for the record that the "weak" status of the symbol should
make no difference at runtime.

Please also note that VER_FLG_WEAK was not for weak symbols, but for "weak
version definitions" :
https://docs.oracle.com/cd/E19957-01/806-0641/6j9vuqujg/index.html#chapter5-16371

That is to say:
* If you have a bug fix / performance improvement, which is externally
invisible to the binary, you can expose a weak version definition for the bug
fix e.g. GLIBC_BZ24718.
* Normal binaries record the weak version definition, but if it's not present
at runtime they operate normally, and the lack of this weak version definition
is ignored.
* Binaries that need the bug fix can depend explicitly on the weak version
definition which promotes it to a strong version definition and it becomes
_required_ at runtime.

In summary:
- weak symbols are not relevant to dynamic linking.
- VER_FLG_WEAK is not for weak symbols but for weak version definitions, and
the traditional role for those in Solaris is to demarcate bug fixes and
performance changes or other library internal changes. Using it for optional
"weak" functions could have unintended behavioural consequences that would need
to be reviewed.

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