aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 2bb9b2f..3b37aba 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3742,13 +3742,19 @@ foo_v1 (void)
Will produce a @code{.symver foo_v1, foo@@VERS_1} directive in the assembler
output.
-It's an error to define multiple version of a given symbol. In such case
-an alias can be used.
+One can also define multiple version for a given symbol.
@smallexample
-__attribute__ ((__symver__ ("foo@@VERS_2")))
-__attribute__ ((alias ("foo_v1")))
-int symver_foo_v1 (void);
+__attribute__ ((__symver__ ("foo@@VERS_2"), ("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