diff options
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/as.texi | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gas/doc/as.texi b/gas/doc/as.texi index 0a6727e..8669879 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -4509,7 +4509,7 @@ Some machine configurations provide additional directives. * Struct:: @code{.struct @var{expression}} @ifset ELF * SubSection:: @code{.subsection} -* Symver:: @code{.symver @var{name},@var{name2@@nodename}} +* Symver:: @code{.symver @var{name},@var{name2@@nodename}[,@var{visibility}]} @end ifset @ifset COFF @@ -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,15 @@ 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 the visibility of the original symbol. The valid +visibilities are @code{local}, @code {hidden}, and @code {remove}. The +@code{local} visibility makes the original symbol a local symbol +(@pxref{Local}). The @code{hidden} visibility sets the visibility of the +original symbol to @code{hidden} (@pxref{Hidden}). The @code{remove} +visibility removes the original symbol from the symbol table if it isn't +used in relocation. If visibility isn't specified, the original symbol +is unchanged. If the symbol @var{name} is not defined within the file being assembled, all references to @var{name} will be changed to @var{name2@@nodename}. If no |