https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63874

--- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Richard Earnshaw from comment #1)
> Sounds like this might be confusion between weak definitions and weak
> references.  If we have a weak reference to the object, we cannot convert it
> into a pc-relative expression, since that would mean we couldn't detect
> NULL.  However, if we have a non-weak reference to a weak object we can
> replace that with a pc-relative addressing mode, _provided_ that we can
> guarantee that the definition will appear in the same link unit (ie it's not
> part of building a DSO).

Patch posted here. 

https://gcc.gnu.org/ml/gcc-patches/2016-03/msg01680.html

Reply via email to