summaryrefslogtreecommitdiff
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-06-29 02:46:51 +0000
committerDavide Italiano <davide@freebsd.org>2016-06-29 02:46:51 +0000
commit8e1131dc46f6f79f9994b0ea89f791094783910e (patch)
treea9d9857b29d3410d4b6de45e1a9451864b8f58c4 /lld/ELF/LinkerScript.cpp
parent941685e9f473873eba00e3df681f968656d2cc0e (diff)
[ELF] Support for wildcard in version scripts.
Example: VERSION_1.0 { global: foo*; local: *; } now correctly matches all the symbols which name starts with `foo`. Differential Revision: http://reviews.llvm.org/D21732 llvm-svn: 274091
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 5618754fb7ce..b98545746dd8 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -35,8 +35,6 @@ using namespace lld::elf;
ScriptConfiguration *elf::ScriptConfig;
-static bool matchStr(StringRef S, StringRef T);
-
// This is an operator-precedence parser to parse and evaluate
// a linker script expression. For each linker script arithmetic
// expression (e.g. ". = . + 0x1000"), a new instance of ExprParser
@@ -291,7 +289,7 @@ int LinkerScript<ELFT>::compareSections(StringRef A, StringRef B) {
// Returns true if S matches T. S can contain glob meta-characters.
// The asterisk ('*') matches zero or more characters, and the question
// mark ('?') matches one character.
-static bool matchStr(StringRef S, StringRef T) {
+bool elf::matchStr(StringRef S, StringRef T) {
for (;;) {
if (S.empty())
return T.empty();