mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
ELF2: Implement --as-needed.
This patch adds AsNeeded and IsUsed bool fields to SharedFile. AsNeeded bit is set if the DSO is enclosed with --as-needed and --no-as-needed. IsUsed bit is off by default. When we adds a symbol to the symbol table for dynamic linking, we set its SharedFile's IsUsed bit. If AsNeeded is set but IsUsed is not set, we don't want to write that file's SO name to DT_NEEDED field. http://reviews.llvm.org/D13579 llvm-svn: 249998
This commit is contained in:
@@ -329,7 +329,7 @@ template <class ELFT> void SharedFile<ELFT>::parse() {
|
||||
error(NameOrErr.getError());
|
||||
StringRef Name = *NameOrErr;
|
||||
|
||||
SymbolBodies.emplace_back(Name, Sym);
|
||||
SymbolBodies.emplace_back(this, Name, Sym);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user