If --dynamic-list is given, only those symbols are preemptible
Patch by Rafael Espíndola. This is PR34053. The implementation is a bit of a hack, given the precise location where IsPreemtible is set, it cannot be used from SymbolTable::handleAnonymousVersion. I could add another method to SymbolTable if you think that would be better. Differential Revision: https://reviews.llvm.org/D36499 llvm-svn: 311468
This commit is contained in:
@@ -175,9 +175,22 @@ static ExprValue bitOr(ExprValue A, ExprValue B) {
|
||||
|
||||
void ScriptParser::readDynamicList() {
|
||||
expect("{");
|
||||
readAnonymousDeclaration();
|
||||
if (!atEOF())
|
||||
std::vector<SymbolVersion> Locals;
|
||||
std::vector<SymbolVersion> Globals;
|
||||
std::tie(Locals, Globals) = readSymbols();
|
||||
expect(";");
|
||||
|
||||
if (!atEOF()) {
|
||||
setError("EOF expected, but got " + next());
|
||||
return;
|
||||
}
|
||||
if (!Locals.empty()) {
|
||||
setError("\"local:\" scope not supported in --dynamic-list");
|
||||
return;
|
||||
}
|
||||
|
||||
for (SymbolVersion V : Globals)
|
||||
Config->DynamicList.push_back(V);
|
||||
}
|
||||
|
||||
void ScriptParser::readVersionScript() {
|
||||
|
||||
Reference in New Issue
Block a user