diff options
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index a95a329..238fde9 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -4289,6 +4289,10 @@ VERS_1.2 @{ VERS_2.0 @{ bar1; bar2; + extern "C++" @{ + ns::*; + "int f(int, double)"; + @} @} VERS_1.2; @end smallexample @@ -4300,6 +4304,8 @@ of the shared library; this is done using wildcard patterns, so that any symbol whose name begins with @samp{old}, @samp{original}, or @samp{new} is matched. The wildcard patterns available are the same as those used in the shell when matching filenames (also known as ``globbing''). +However, if you specify the symbol name inside double quotes, then the +name is treated as literal, rather than as a glob pattern. Next, the version script defines node @samp{VERS_1.2}. This node depends upon @samp{VERS_1.1}. The script binds the symbol @samp{foo2} @@ -4409,6 +4415,16 @@ The linker will iterate over the list of symbols at the link time and demangle them according to @samp{lang} before matching them to the patterns specified in @samp{version-script-commands}. +Demangled names may contains spaces and other special characters. As +described above, you can use a glob pattern to match demangled names, +or you can use a double-quoted string to match the string exactly. In +the latter case, be aware that minor differences (such as differing +whitespace) between the version script and the demangler output will +cause a mismatch. As the exact string generated by the demangler +might change in the future, even if the mangled name does not, you +should check that all of your version directives are behaving as you +expect when you upgrade. + @node Expressions @section Expressions in Linker Scripts @cindex expressions |