diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-08-17 10:08:30 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-08-17 10:08:30 +0000 |
commit | 96f8ade54630830d0707c22ae531d32baa3c9966 (patch) | |
tree | c70a4d1a88628eaba276c7dac39cde0d452b6f00 /ld/ldgram.y | |
parent | 8d1d654fb401245cefa690a03e61f56cf953999e (diff) | |
download | gdb-96f8ade54630830d0707c22ae531d32baa3c9966.zip gdb-96f8ade54630830d0707c22ae531d32baa3c9966.tar.gz gdb-96f8ade54630830d0707c22ae531d32baa3c9966.tar.bz2 |
* ldgram.y (vers_defns): Don't lose pattern list before
extern NAME {}. Handle global, local and extern symbol names.
ld/testsuite/
* ld-elfvers/vers.exp: Add a new test, vers30.
* ld-elfvers/vers30.c: New file.
* ld-elfvers/vers30.map: New file.
* ld-elfvers/vers30.ver: New file.
* ld-elfvers/vers30.dsym: New file.
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r-- | ld/ldgram.y | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y index 44896e1..c8cf6c1 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -1226,6 +1226,9 @@ vers_defns: } vers_defns opt_semicolon '}' { + struct bfd_elf_version_expr *pat; + for (pat = $7; pat->next != NULL; pat = pat->next); + pat->next = $1; $$ = $7; ldgram_vers_current_lang = $<name>6; } @@ -1239,6 +1242,30 @@ vers_defns: $$ = $5; ldgram_vers_current_lang = $<name>4; } + | GLOBAL + { + $$ = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang); + } + | vers_defns ';' GLOBAL + { + $$ = lang_new_vers_pattern ($1, "global", ldgram_vers_current_lang); + } + | LOCAL + { + $$ = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang); + } + | vers_defns ';' LOCAL + { + $$ = lang_new_vers_pattern ($1, "local", ldgram_vers_current_lang); + } + | EXTERN + { + $$ = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang); + } + | vers_defns ';' EXTERN + { + $$ = lang_new_vers_pattern ($1, "extern", ldgram_vers_current_lang); + } ; opt_semicolon: |