Recommit [ELF] - Versionscript: do not treat non-wildcarded names as wildcards.
Fixed code that was not checked before on windows for me, because of testcases that are
disabled on that platform atm.
Inital commit message:
"[ELF] - Versionscript: do not treat non-wildcarded names as wildcards."
Previously we incorrectly handled cases when symbol name in extern c++ tag
was enclosed in quotes. Next case was treated as wildcard:
GLIBCXX_3.4 {
extern "C++" {
"aaa*"
}
But it should have not. Quotes around aaa here means that we should have do exact
name matching.
That is PR30268 which has name with pointer is interpreted as wildcard by lld:
extern "C++" {
"operator delete[](void*)";
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D24229
llvm-svn: 281049
diff --git a/lld/ELF/SymbolListFile.cpp b/lld/ELF/SymbolListFile.cpp
index cd977c5..3fe83d4 100644
--- a/lld/ELF/SymbolListFile.cpp
+++ b/lld/ELF/SymbolListFile.cpp
@@ -16,6 +16,7 @@
#include "SymbolListFile.h"
#include "Config.h"
#include "ScriptParser.h"
+#include "Strings.h"
#include "llvm/Support/MemoryBuffer.h"
using namespace llvm;
@@ -43,7 +44,7 @@
while (!atEOF()) {
expect("{");
while (!Error) {
- Config->DynamicList.push_back(next());
+ Config->DynamicList.push_back(unquote(next()));
expect(";");
if (skip("}"))
break;