aboutsummaryrefslogtreecommitdiff
path: root/ld/ldgram.y
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-10-13 17:29:57 +0000
committerMark Mitchell <mark@codesourcery.com>2005-10-13 17:29:57 +0000
commit86043bbbd53f965b6f2003af2f96f55c6702d0de (patch)
tree7d60692bd4cfd11bcc87add6bf515321c42c27cb /ld/ldgram.y
parent16451949d7083391405bb46c06a2fadac01f5c42 (diff)
downloadgdb-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/ldgram.y')
-rw-r--r--ld/ldgram.y24
1 files changed, 16 insertions, 8 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y
index f6e2aa2..3829e6a 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -1219,11 +1219,19 @@ vers_tag:
vers_defns:
VERS_IDENTIFIER
{
- $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, FALSE);
+ }
+ | NAME
+ {
+ $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE);
}
| vers_defns ';' VERS_IDENTIFIER
{
- $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' NAME
+ {
+ $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, TRUE);
}
| vers_defns ';' EXTERN NAME '{'
{
@@ -1250,27 +1258,27 @@ vers_defns:
}
| GLOBAL
{
- $$ = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang, FALSE);
}
| vers_defns ';' GLOBAL
{
- $$ = lang_new_vers_pattern ($1, "global", ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern ($1, "global", ldgram_vers_current_lang, FALSE);
}
| LOCAL
{
- $$ = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang, FALSE);
}
| vers_defns ';' LOCAL
{
- $$ = lang_new_vers_pattern ($1, "local", ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern ($1, "local", ldgram_vers_current_lang, FALSE);
}
| EXTERN
{
- $$ = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang, FALSE);
}
| vers_defns ';' EXTERN
{
- $$ = lang_new_vers_pattern ($1, "extern", ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern ($1, "extern", ldgram_vers_current_lang, FALSE);
}
;