bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/19823] gold doesn't consider copy reloc of protected symbols


From: ccoutant at gmail dot com
Subject: [Bug gold/19823] gold doesn't consider copy reloc of protected symbols
Date: Tue, 15 Mar 2016 01:14:26 +0000

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

--- Comment #1 from Cary Coutant <ccoutant at gmail dot com> ---
> The issue is that protected symbols cat still show up in copy relocations and
> in undefined plt entries.

This is from the System V ABI:

> STV_PROTECTED
>
> A symbol defined in the current component is protected if it is
> visible in other components but not preemptable, meaning that any
> reference to such a symbol from within the defining component
> must be resolved to the definition in that component, even if
> there is a definition in another component that would preempt by
> the default rules. A symbol with STB_LOCAL binding may not have
> STV_PROTECTED visibility. If a symbol definition with
> STV_PROTECTED visibility from a shared object is taken as
> resolving a reference from an executable or another shared
> object, the SHN_UNDEF symbol table entry created has STV_DEFAULT
> visibility.

I think you filed this bug report against the wrong linker.

The whole point of protected visibility is to allow static binding
within the object where the symbol is defined. The compiler may have
taken advantage of the protected visibility and generated a code
sequence that cannot reach a copy.

Or, perhaps (I need to check...), gold might be incorrectly allowing
the COPY relocation to a protected symbol, failing to consider that
the bindings within the shared object will be static. (I thought that
came up a while ago, and got fixed, but maybe it was just something
similar.) If that's the case, you can either edit the title of this PR
or close this and file a separate one.

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