* STV_PROTECTED
@ 2015-09-29 10:14 Gabriel Corona
[not found] ` <20150929101411.GA17105-0+RUnzqQamR98t58zOhiHA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Gabriel Corona @ 2015-09-29 10:14 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA
Hi,
The elf manpage [2] claims that:
> STV_PROTECTED Not preemptible, not exported.
However the System V gABI [1] claims that:
> A symbol defined in the current component is protected if it is
> visible in other components but not preemptable
Should the manpage read something like:
> STV_PROTECTED Not preemptible but exported.
[1] http://www.sco.com/developers/gabi/2003-12-17/ch4.symtab.html
[2] http://man7.org/linux/man-pages/man5/elf.5.html
--
Gabriel Corona
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: STV_PROTECTED
[not found] ` <20150929101411.GA17105-0+RUnzqQamR98t58zOhiHA@public.gmane.org>
@ 2016-03-09 1:03 ` Michael Kerrisk (man-pages)
[not found] ` <56DF7669.70204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-03-09 1:03 UTC (permalink / raw)
To: Gabriel Corona, linux-man-u79uwXL29TY76Z2rM5mHXA
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, Mike Frysinger
[CC += Mike]
Hello Gabriel,
On 09/29/2015 12:14 PM, Gabriel Corona wrote:
> Hi,
>
> The elf manpage [2] claims that:
>
>> STV_PROTECTED Not preemptible, not exported.
>
> However the System V gABI [1] claims that:
>
>> A symbol defined in the current component is protected if it is
>> visible in other components but not preemptable
>
> Should the manpage read something like:
>
>> STV_PROTECTED Not preemptible but exported.
>
> [1] http://www.sco.com/developers/gabi/2003-12-17/ch4.symtab.html
>
> [2] http://man7.org/linux/man-pages/man5/elf.5.html
I think you are right, but let's see if Mike might confirm,
since he originally added that text. (Mike, I suspect there
was a wordo here.)
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: STV_PROTECTED
[not found] ` <56DF7669.70204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-03-09 5:01 ` Mike Frysinger
[not found] ` <20160309050136.GR6588-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2016-03-09 5:01 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Gabriel Corona, linux-man-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 3051 bytes --]
On 09 Mar 2016 02:03, Michael Kerrisk (man-pages) wrote:
> On 09/29/2015 12:14 PM, Gabriel Corona wrote:
> > The elf manpage [2] claims that:
> >
> >> STV_PROTECTED Not preemptible, not exported.
> >
> > However the System V gABI [1] claims that:
> >
> >> A symbol defined in the current component is protected if it is
> >> visible in other components but not preemptable
> >
> > Should the manpage read something like:
> >
> >> STV_PROTECTED Not preemptible but exported.
> >
> > [1] http://www.sco.com/developers/gabi/2003-12-17/ch4.symtab.html
> >
> > [2] http://man7.org/linux/man-pages/man5/elf.5.html
>
> I think you are right, but let's see if Mike might confirm,
> since he originally added that text. (Mike, I suspect there
> was a wordo here.)
i didn't really author that content, but take it from elf.h in glibc:
#define STV_PROTECTED 3 /* Not preemptible, not exported */
and binutils says:
#define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */
and llvm says:
STV_PROTECTED = 3 // Visible in other components but not preemptable
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.
so while "Not preemptible but exported" is more correct, i'm not sure it's
still all that great. maybe "Exported; not preemptible in current module." ?
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: STV_PROTECTED
[not found] ` <20160309050136.GR6588-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>
@ 2016-03-09 18:26 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-03-09 18:26 UTC (permalink / raw)
To: Michael Kerrisk (man-pages), Gabriel Corona, linux-man
Hi Mike,
On 9 March 2016 at 06:01, Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote:
> On 09 Mar 2016 02:03, Michael Kerrisk (man-pages) wrote:
>> On 09/29/2015 12:14 PM, Gabriel Corona wrote:
>> > The elf manpage [2] claims that:
>> >
>> >> STV_PROTECTED Not preemptible, not exported.
>> >
>> > However the System V gABI [1] claims that:
>> >
>> >> A symbol defined in the current component is protected if it is
>> >> visible in other components but not preemptable
>> >
>> > Should the manpage read something like:
>> >
>> >> STV_PROTECTED Not preemptible but exported.
>> >
>> > [1] http://www.sco.com/developers/gabi/2003-12-17/ch4.symtab.html
>> >
>> > [2] http://man7.org/linux/man-pages/man5/elf.5.html
>>
>> I think you are right, but let's see if Mike might confirm,
>> since he originally added that text. (Mike, I suspect there
>> was a wordo here.)
>
> i didn't really author that content, but take it from elf.h in glibc:
> #define STV_PROTECTED 3 /* Not preemptible, not exported */
>
> and binutils says:
> #define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */
>
> and llvm says:
> STV_PROTECTED = 3 // Visible in other components but not preemptable
>
> 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.
>
> so while "Not preemptible but exported" is more correct, i'm not sure it's
> still all that great. maybe "Exported; not preemptible in current module." ?
Thanks for the detailed confirmation, Mike. I made the text:
STV_PROTECTED Symbol is available in other modules,
but references in the local module
always resolve to the local symbol.
Thanks for the report Gabriel!
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-09 18:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 10:14 STV_PROTECTED Gabriel Corona
[not found] ` <20150929101411.GA17105-0+RUnzqQamR98t58zOhiHA@public.gmane.org>
2016-03-09 1:03 ` STV_PROTECTED Michael Kerrisk (man-pages)
[not found] ` <56DF7669.70204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-09 5:01 ` STV_PROTECTED Mike Frysinger
[not found] ` <20160309050136.GR6588-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>
2016-03-09 18:26 ` STV_PROTECTED Michael Kerrisk (man-pages)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox