mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
db337e545c
commit
2c8e09b4ff
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue