diff options
Diffstat (limited to 'lld/ELF')
| -rw-r--r-- | lld/ELF/Config.h | 1 | ||||
| -rw-r--r-- | lld/ELF/ScriptParser.cpp | 17 | ||||
| -rw-r--r-- | lld/ELF/SymbolTable.cpp | 19 | ||||
| -rw-r--r-- | lld/ELF/SymbolTable.h | 2 | ||||
| -rw-r--r-- | lld/ELF/Writer.cpp | 5 |
5 files changed, 4 insertions, 40 deletions
diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h index 59745cd0817..45c9565e210 100644 --- a/lld/ELF/Config.h +++ b/lld/ELF/Config.h @@ -104,7 +104,6 @@ struct Configuration { std::vector<llvm::StringRef> SearchPaths; std::vector<llvm::StringRef> SymbolOrderingFile; std::vector<llvm::StringRef> Undefined; - std::vector<SymbolVersion> DynamicList; std::vector<SymbolVersion> VersionScriptGlobals; std::vector<SymbolVersion> VersionScriptLocals; std::vector<uint8_t> BuildIdVector; diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index 6f0dd879a2d..fdeeafd39fc 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -175,22 +175,9 @@ static ExprValue bitOr(ExprValue A, ExprValue B) { void ScriptParser::readDynamicList() { expect("{"); - std::vector<SymbolVersion> Locals; - std::vector<SymbolVersion> Globals; - std::tie(Locals, Globals) = readSymbols(); - expect(";"); - - if (!atEOF()) { + readAnonymousDeclaration(); + 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() { diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index 9962b2554e0..ec8ae5d75bb 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -680,24 +680,6 @@ void SymbolTable::handleAnonymousVersion() { assignWildcardVersion(Ver, VER_NDX_LOCAL); } -// Handles -dynamic-list. -void SymbolTable::handleDynamicList() { - for (SymbolVersion &Ver : Config->DynamicList) { - std::vector<SymbolBody *> Syms; - if (Ver.HasWildcard) - Syms = findByVersion(Ver); - else - Syms = findAllByVersion(Ver); - - for (SymbolBody *B : Syms) { - if (!Config->Shared) - B->symbol()->VersionId = VER_NDX_GLOBAL; - else if (B->symbol()->includeInDynsym()) - B->IsPreemptible = true; - } - } -} - // Set symbol versions to symbols. This function handles patterns // containing no wildcard characters. void SymbolTable::assignExactVersion(SymbolVersion Ver, uint16_t VersionId, @@ -747,7 +729,6 @@ void SymbolTable::assignWildcardVersion(SymbolVersion Ver, uint16_t VersionId) { void SymbolTable::scanVersionScript() { // Handle edge cases first. handleAnonymousVersion(); - handleDynamicList(); // Now we have version definitions, so we need to set version ids to symbols. // Each version definition has a glob pattern, and all symbols that match diff --git a/lld/ELF/SymbolTable.h b/lld/ELF/SymbolTable.h index 6c094073e6c..3127cd66690 100644 --- a/lld/ELF/SymbolTable.h +++ b/lld/ELF/SymbolTable.h @@ -90,8 +90,6 @@ public: void trace(StringRef Name); - void handleDynamicList(); - private: std::vector<SymbolBody *> findByVersion(SymbolVersion Ver); std::vector<SymbolBody *> findAllByVersion(SymbolVersion Ver); diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index e61efb39ca6..e12de224c15 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1219,9 +1219,8 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() { applySynthetic({In<ELFT>::EhFrame}, [](SyntheticSection *SS) { SS->finalizeContents(); }); - if (Config->DynamicList.empty()) - for (Symbol *S : Symtab->getSymbols()) - S->body()->IsPreemptible = computeIsPreemptible(*S->body()); + for (Symbol *S : Symtab->getSymbols()) + S->body()->IsPreemptible = computeIsPreemptible(*S->body()); // Scan relocations. This must be done after every symbol is declared so that // we can correctly decide if a dynamic relocation is needed. |

