public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/symver-improve-doc)] docs: update symver attribute description
@ 2021-04-12 11:43 Martin Liska
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2021-04-12 11:43 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2ead1f61e3567797a5e3fe59be749db9d9ba98e5

commit 2ead1f61e3567797a5e3fe59be749db9d9ba98e5
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Apr 12 13:42:33 2021 +0200

    docs: update symver attribute description
    
    gcc/ChangeLog:
    
            * doc/extend.texi: Be more precise in documentation
            of symver attribute.

Diff:
---
 gcc/doc/extend.texi | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e28e1860990..61d9a684b24 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3848,7 +3848,8 @@ foo_v1 (void)
 Will produce a @code{.symver foo_v1, foo@@VERS_1} directive in the assembler
 output. 
 
-One can also define multiple version for a given symbol.
+One can also define multiple version for a given symbol
+(starting from binutils 2.35).
 
 @smallexample
 __attribute__ ((__symver__ ("foo@@VERS_2"), __symver__ ("foo@@VERS_3")))
@@ -3863,8 +3864,8 @@ int symver_bar_v1 (void)
 @}
 @end smallexample
 
-This example creates an alias of @code{foo_v1} with symbol name
-@code{symver_foo_v1} which will be version @code{VERS_2} of @code{foo}.
+This example creates a symbol name @code{symver_foo_v1}
+which will be version @code{VERS_2} and @code{VERS_3} of @code{foo}.
 
 Finally if the parameter is @code{"@var{name2}@@@@@var{nodename}"} then in
 addition to creating a symbol version (as if


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/users/marxin/heads/symver-improve-doc)] docs: update symver attribute description
@ 2021-04-12 12:32 Martin Liska
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2021-04-12 12:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:750b715225d480fcb74e765623d54acc42ac25e3

commit 750b715225d480fcb74e765623d54acc42ac25e3
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Apr 12 13:42:33 2021 +0200

    docs: update symver attribute description
    
    gcc/ChangeLog:
    
            * doc/extend.texi: Be more precise in documentation
            of symver attribute.

Diff:
---
 gcc/doc/extend.texi | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e28e1860990..75e4a43a8c5 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3848,23 +3848,27 @@ foo_v1 (void)
 Will produce a @code{.symver foo_v1, foo@@VERS_1} directive in the assembler
 output. 
 
-One can also define multiple version for a given symbol.
+One can also define multiple version for a given symbol
+(starting from binutils 2.35).
 
 @smallexample
 __attribute__ ((__symver__ ("foo@@VERS_2"), __symver__ ("foo@@VERS_3")))
 int symver_foo_v1 (void)
 @{
 @}
-
-__attribute__ ((__symver__ ("bar@@VERS_2")))
-__attribute__ ((__symver__ ("bar@@VERS_3")))
-int symver_bar_v1 (void)
-@{
-@}
 @end smallexample
 
-This example creates an alias of @code{foo_v1} with symbol name
-@code{symver_foo_v1} which will be version @code{VERS_2} of @code{foo}.
+This example creates a symbol name @code{symver_foo_v1}
+which will be version @code{VERS_2} and @code{VERS_3} of @code{foo}.
+
+If you have an older release of binutils release, then symbol alias needs to
+be used:
+
+@smallexample
+__attribute__ ((__symver__ ("foo@@VERS_2")))
+__attribute__ ((alias ("foo_v1")))
+int symver_foo_v1 (void);
+@end smallexample
 
 Finally if the parameter is @code{"@var{name2}@@@@@var{nodename}"} then in
 addition to creating a symbol version (as if


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-12 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 11:43 [gcc(refs/users/marxin/heads/symver-improve-doc)] docs: update symver attribute description Martin Liska
2021-04-12 12:32 Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).