aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-03-09 19:25:22 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-03-09 19:42:54 +0100
commit2c8e09b4ff09235cc7955021358ade17562aac54 (patch)
tree3ce9299826d9619e8b5506aa055d20dc57067de8
parentdb337e545c1b6c0ddfd975fbc118b22cb470acea (diff)
downloadman-pages-2c8e09b4ff09235cc7955021358ade17562aac54.tar.gz
elf.5: Fix description of STV_PROTECTED
Quoting Mike: gabi says: https://refspecs.linuxbase.org/elf/gabi4+/ch4.symtab.html 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. solaris/oracle says: https://docs.oracle.com/cd/E26502_01/html/E26507/chapter6-79797.html A symbol that is defined in the current component is protected if the symbol is visible in other components, but cannot be preempted. Any reference to such a symbol from within the defining component must be resolved to the definition in that component. This resolution must occur, even if a symbol definition exists in another component that would interpose by the default rules. A symbol with STB_LOCAL binding will not have STV_PROTECTED visibility. but i think this ibm article is probably the most understandable: https://www.ibm.com/developerworks/aix/library/au-aix-symbol-visibility/ The symbol is visible outside the current executable or shared object, but it may not be overridden. In other words, if a protected symbol in a shared library is referenced by an other code in the shared library, the other code will always reference the symbol in the shared library, even if the executable defines a symbol with the same name. Reported-by: Gabriel Corona <gabriel.corona@enst-bretagne.fr> Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man5/elf.53
1 files changed, 2 insertions, 1 deletions
diff --git a/man5/elf.5 b/man5/elf.5
index cb6dd81bf2..eba7dd2a2b 100644
--- a/man5/elf.5
+++ b/man5/elf.5
@@ -1553,7 +1553,8 @@ Processor-specific hidden class
Symbol is unavailable in other modules
.TP
.BR STV_PROTECTED
-Not preemptible, not exported
+Symbol is available in other modules,
+but references in the local module always resolve to the local symbol.
.PD
.PP
There are macros for extracting the visibility type: