diff options
author | Ian Lance Taylor <iant@google.com> | 2008-01-18 23:35:09 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-01-18 23:35:09 +0000 |
commit | 106002249a4341c91adc0c25f63c84cd1b544737 (patch) | |
tree | c502e6cfa078ce18a78e5287b9eca3434636b15b /gold/testsuite | |
parent | 14144f39e4581f4f39bcd44c2f8336fee28b0220 (diff) | |
download | gdb-106002249a4341c91adc0c25f63c84cd1b544737.zip gdb-106002249a4341c91adc0c25f63c84cd1b544737.tar.gz gdb-106002249a4341c91adc0c25f63c84cd1b544737.tar.bz2 |
From Craig Silverstein: Handle quoted strings differently in version
scripts, and handle extern "C++" in the middle of a block.
Diffstat (limited to 'gold/testsuite')
-rw-r--r-- | gold/testsuite/ver_matching_def.cc | 4 | ||||
-rwxr-xr-x | gold/testsuite/ver_matching_test.sh | 6 | ||||
-rw-r--r-- | gold/testsuite/version_script.map | 7 |
3 files changed, 16 insertions, 1 deletions
diff --git a/gold/testsuite/ver_matching_def.cc b/gold/testsuite/ver_matching_def.cc index 71d8d32..2eba163 100644 --- a/gold/testsuite/ver_matching_def.cc +++ b/gold/testsuite/ver_matching_def.cc @@ -28,6 +28,10 @@ void foo1() {} // local void bar() {} // V1 void bar1() {} // global +void baz(int*) {} // V1 +void baz(int*, char) {} // global +void baz(char*, int) {} // global + extern "C" { void bar2() {} // V1 }; diff --git a/gold/testsuite/ver_matching_test.sh b/gold/testsuite/ver_matching_test.sh index 48dd9a5..2ecdd98 100755 --- a/gold/testsuite/ver_matching_test.sh +++ b/gold/testsuite/ver_matching_test.sh @@ -73,6 +73,12 @@ check ver_matching_test.stdout "Base *bla$" check ver_matching_test.stdout "V2 *blaz$" check ver_matching_test.stdout "V2 *blazb$" +# Stuff inside quotes is matched literally, so "baz(int*, char)" should +# not match the "baz(int *)" entry in the version table. +check ver_matching_test.stdout "V1 *baz(int\\*)$" +check_missing ver_matching_test.stdout "V1 *baz(int\\*, char)$" +check_missing ver_matching_test.stdout "V1 *baz(char\\*, int)$" + # TODO: foo1 should be a local symbol and not show up in the .dynsym # dump, but we haven't figured out how to suppress it yet. # check_missing ver_matching_test.stdout "foo1" diff --git a/gold/testsuite/version_script.map b/gold/testsuite/version_script.map index 2a17523..c7662af 100644 --- a/gold/testsuite/version_script.map +++ b/gold/testsuite/version_script.map @@ -3,11 +3,16 @@ V1 { extern "C++" { "bar()"; - myns::*; + "baz(int*)"; }; foo; blaza*; bar*; + # Make sure we parse "extern" when it's not first thing in the section. + extern "C++" + { + myns::*; + }; # Would be a keyword in a linker script. SECTIONS; sizeof_headers; |