[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE
From: |
amodra at gmail dot com |
Subject: |
[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE |
Date: |
Wed, 11 Oct 2017 03:04:40 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22269
--- Comment #11 from Alan Modra <amodra at gmail dot com> ---
> If there is a program bug:
> ...
> may lead to undesired behavior.
Quite so.
> -z dynamic-undefined-weak applies if there is a DT_NEEDED entry which
> may provide definition for undefined weak reference at run-time. For static
> PIE, weak undefined should always be resolved to 0.
I agree, which is why I felt it was a good idea to default
link_info.dynamic_undefined_weak to 0 when link_info.nointerp.
Also, --no-dynamic-linker -z dynamic-undefined-weak probably ought to be an
error, or at least warn.
However, making that change (or explicitly passing -z nodynamic-undefined-weak)
results in x86 tests that fail, due to not generating a plt entry for the
undefined weak call. No matter how I look at it, that is a bug in the x86
backend: link_info.dynamic_undefined_weak should not control the generation of
a plt entry. (I'm also of the opinion that adding a plt entry for an undefined
weak without dynamic relocs is just bloat, but that's a separate issue and one
I don't care to argue about.)
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, (continued)
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, hjl.tools at gmail dot com, 2017/10/06
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, hjl.tools at gmail dot com, 2017/10/06
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, hjl.tools at gmail dot com, 2017/10/06
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, amodra at gmail dot com, 2017/10/09
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, hjl.tools at gmail dot com, 2017/10/09
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, amodra at gmail dot com, 2017/10/10
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, hjl.tools at gmail dot com, 2017/10/10
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, hjl.tools at gmail dot com, 2017/10/10
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, amodra at gmail dot com, 2017/10/10
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, hjl.tools at gmail dot com, 2017/10/10
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE,
amodra at gmail dot com <=
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/11
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, hjl.tools at gmail dot com, 2017/10/11
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/12
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/14
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/14
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/14
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/14
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/14
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/14
- [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE, cvs-commit at gcc dot gnu.org, 2017/10/14