[PATCH] gas: Extend .symver directive

H.J. Lu hjl.tools@gmail.com
Tue Apr 7 12:49:19 GMT 2020


On Tue, Apr 7, 2020 at 5:41 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Apr 07 2020, H.J. Lu via Binutils wrote:
>
> > @@ -7112,9 +7112,9 @@ shared library.
> >
> >  For ELF targets, the @code{.symver} directive can be used like this:
> >  @smallexample
> > -.symver @var{name}, @var{name2@@nodename}
> > +.symver @var{name}, @var{name2@@nodename}[ ,@var{visibility}]
> >  @end smallexample
> > -If the symbol @var{name} is defined within the file
> > +If the original symbol @var{name} is defined within the file
> >  being assembled, the @code{.symver} directive effectively creates a symbol
> >  alias with the name @var{name2@@nodename}, and in fact the main reason that we
> >  just don't try and create a regular alias is that the @var{@@} character isn't
> > @@ -7127,7 +7127,14 @@ function is being mentioned.  The @var{nodename} portion of the alias should be
> >  the name of a node specified in the version script supplied to the linker when
> >  building a shared library.  If you are attempting to override a versioned
> >  symbol from a shared library, then @var{nodename} should correspond to the
> > -nodename of the symbol you are trying to override.
> > +nodename of the symbol you are trying to override.  The optional
>                                                                     argument
>
> > +@var{visibility} updates visibility of the original symbol.  The valid
>                            the
>
> > +visibilities are @code{local}, @code {hidden}, and @code {remove}.
> > +@code{local} makes the original symbol a local symbol (@pxref{Local}).
> > +@code{hidden} sets the visibility of the original symbol to
> > +@code{hidden} (@pxref{Hidden}).  @code{remove} removes the original
>
> A sentence should always start with a capitalized word, please reword.

How about this?

The optional argument VISIBILITY updates the visibility of
the original symbol.  The valid visibilities are 'local', 'hidden', and
'remove'.  The 'local' visibility makes the original symbol a local
symbol (*note Local::).  The 'hidden' visibility sets the visibility of
the original symbol to 'hidden' (*note Hidden::).  The 'remove'
visibility removes the original symbol from the symbol table.  If
visibility isn't specified, the original symbol is unchanged.

-- 
H.J.


More information about the Binutils mailing list