[PATCH] D21681: [ELF] - Implemented support of default/non-default symbols versions
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 21:41:55 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/SymbolTable.cpp:188
@@ +187,3 @@
+ size_t I = 2;
+ for (elf::Version &V : Config->SymbolVersions) {
+ if (V.Name == Version) {
----------------
This is O(n)*O(m) where n is the number of symbols with "@" and m is the number of symbols in version scripts. This is probably too inefficient. Please use a hash table.
================
Comment at: ELF/SymbolTable.cpp:211
@@ -177,6 +210,3 @@
Sym->ExportDynamic = false;
- if (Config->VersionScriptGlobalByDefault)
- Sym->VersionId = VER_NDX_GLOBAL;
- else
- Sym->VersionId = VER_NDX_LOCAL;
+ setupVersionAttributes(Sym, Name);
SymVector.push_back(Sym);
----------------
I don't see a reason to do this right here in insert(). You can add a new scan* path, no?
http://reviews.llvm.org/D21681
More information about the llvm-commits
mailing list