[PATCH] D119294: [lld-macho] -flat_namespace for dylibs should make all externs interposable
Di Mo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 13:50:11 PST 2022
modimo added a comment.
Internally in LLVM IR processing interposability is represented by the following check <https://github.com/llvm/llvm-project/blob/e2b219bded113160500d1084f87ee11ec926877b/llvm/lib/IR/Globals.cpp#L98>:
bool GlobalValue::isInterposable() const {
if (isInterposableLinkage(getLinkage()))
return true;
return getParent() && getParent()->getSemanticInterposition() &&
!isDSOLocal();
}
I'm wondering: is there's a case where a dso_local function/global that comes into link with -flat_namespace/-interposable set? In ELF land interposability is set at compile time but with these flags on MachO it looks possible to set them at link time. If so that also makes pre-LTO optimizations strange because it might inline a function that later turns interposable. Given the previous statement I suspect I'm missing something here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119294/new/
https://reviews.llvm.org/D119294
More information about the llvm-commits
mailing list