[PATCH] D115092: [lld-macho] Unreferenced weak dylib symbols shouldn't fetch archive symbols
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 4 21:27:06 PST 2021
int3 marked an inline comment as done.
int3 added inline comments.
================
Comment at: lld/MachO/SymbolTable.cpp:193
+ if (dysym->isWeakDef()) {
+ if (dysym->getRefState() != RefState::Unreferenced)
+ file->fetch(sym);
----------------
oontvoo wrote:
> I wonder if this should be `== RefState::Strong`.
>
> can't find docs anywhere for MachO, but in ELF, it seems weak-ref doesn't trigger a fetch from an archive ...
good question. Turns out that for Mach-O, weak refs do trigger fetches. But I should have tested it :) adding one now
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115092/new/
https://reviews.llvm.org/D115092
More information about the llvm-commits
mailing list