[ELF] - Implemented version script hierarchies.
Patch implements hierarchies for version scripts.
This allows to handle script files with dependencies, like next one has:
LIBSAMPLE_1.0{
global:
a;
};
LIBSAMPLE_2.0
{
global:
b;
}LIBSAMPLE_1.0;
Differential revision: http://reviews.llvm.org/D21556
llvm-svn: 273423
diff --git a/lld/ELF/SymbolListFile.cpp b/lld/ELF/SymbolListFile.cpp
index 86e77ed..b9da8b8 100644
--- a/lld/ELF/SymbolListFile.cpp
+++ b/lld/ELF/SymbolListFile.cpp
@@ -94,6 +94,8 @@
parseVersionSymbols(Version);
expect("}");
+ if (!Version.empty() && peek() != ";")
+ Config->SymbolVersions.back().Parent = next();
expect(";");
}