[PATCH] D77280: [ELF] Make --version-script/--dynamic-list work for lazy symbols fetched by LTO libcalls
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 03:47:21 PDT 2020
grimar added inline comments.
================
Comment at: lld/ELF/SymbolTable.cpp:123
for (Symbol *sym : symVector) {
- if (!sym->isDefined() && !sym->isCommon())
+ if (!sym->isDefined() && !sym->isCommon() && !sym->isLazy())
continue;
----------------
Seems this change is untested.
================
Comment at: lld/ELF/SymbolTable.cpp:153
+ // See the comment in findByVersion() for the matched symbols.
for (Symbol *sym : symVector)
----------------
What do you think about adding a helper like the following?
(to avoid the duplication in 3 places)
```
// <comment>
static bool canBeVersioned(const Symbol& Sym) {
return b->isDefined() || b->isCommon() || b->isLazy()
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77280/new/
https://reviews.llvm.org/D77280
More information about the llvm-commits
mailing list