You specify a symbol versioning script file with the command-line option
--symver_script=file
. Using this option
automatically enables symbol versioning.
The script file supports the same syntax as the GNU ld linker.
Using a script file enables you to associate a version with an earlier version.
You can provide a steering file in addition to the embedded symbol method.
If you choose to do this then your script file must match your embedded symbols and use the
Backus-Naur Form (BNF) notation:
version_definition ::=
version_name "{" symbol_association* "}" [depend_version] ";"
symbol_association ::=
"local:" | "global:" | symbol_name
";"
Where:
Version names have no specific meaning, but they are significant in that
they make it into the output. In the output, they are a part of the version specification of
the library and a part of the version requirements of a program that links against such a
library. The following example shows the use of version names:
VERSION_1
{
...
};
VERSION_2
{
...
} VERSION_1;
Note:
If you use a script file then the version definitions and symbols associated with them
must match. The linker warns you if it detects any mismatch.