[PATCH] D86575: [lld-macho] Emit binding opcodes for defined symbols that override weak dysyms
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 21:54:23 PDT 2020
smeenai added inline comments.
================
Comment at: lld/MachO/SymbolTable.cpp:85
+ if (auto *defined = dyn_cast<Defined>(s))
+ if (!defined->isWeakDef())
+ defined->overridesWeakDef = true;
----------------
Doesn't this need to check `isWeakDef` as well?
================
Comment at: lld/test/MachO/weak-header-flags.s:23
+# WEAK-DEFINES-ONLY: MH_WEAK_DEFINES
+# WEAK-DEFINES-ONLY-NOT: MH_BINDS_TO_WEAK
+
----------------
Similar comment as the last one, although this time it's not hypothetical ... this is only checking that there's no `MH_BINDS_TO_WEAK` after `MH_WEAK_DEFINES`, and won't catch an `MH_BINDS_TO_WEAK` that appears before the `MH_WEAK_DEFINES`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86575/new/
https://reviews.llvm.org/D86575
More information about the llvm-commits
mailing list