diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-10-13 17:29:57 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2005-10-13 17:29:57 +0000 |
commit | 86043bbbd53f965b6f2003af2f96f55c6702d0de (patch) | |
tree | 7d60692bd4cfd11bcc87add6bf515321c42c27cb /ld/ld.texinfo | |
parent | 16451949d7083391405bb46c06a2fadac01f5c42 (diff) | |
download | gdb-86043bbbd53f965b6f2003af2f96f55c6702d0de.zip gdb-86043bbbd53f965b6f2003af2f96f55c6702d0de.tar.gz gdb-86043bbbd53f965b6f2003af2f96f55c6702d0de.tar.bz2 |
* ld.texino: Describe double-quoted string syntax for version
nodes.
* ldlang.h (lang_new_vers_pattern): Add literal_p parameter.
* ldgram.y (vers_defns): Allow NAME as well as VERS_IDENTIFIER.
Adjust calls to lang_new_vers_pattern to pass literal_p argument.
* ldlang.c (lang_vers_match): Fix indentation. Do not glob-match
version nodes without a pattern.
(lang_new_vers_pattern): Add literal_p parameter.
(lang_do_version_exports_section): Pass it.
* ld-elfvers/vers.exp: Add vers31.
* ld-elfvers/vers31.c: New file.
* ld-elfvers/vers31.dsym: Likewise.
* ld-elfvers/vers31.map: Likewise.
* ld-elfvers/vers31.ver: Likewise.
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 |