[PATCH] D112977: [lld-macho] Fix failed assertion in registerCompactUnwind

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 14:43:55 PDT 2021


int3 added inline comments.


================
Comment at: lld/MachO/SymbolTable.cpp:71-72
 
+        defined->referencedDynamically |= isReferencedDynamically;
+        defined->noDeadStrip |= noDeadStrip;
+
----------------
is this what ld64 does for these two attributes too? (can we test it?)


================
Comment at: lld/MachO/SymbolTable.cpp:69-74
+        defined->referencedDynamically |= isReferencedDynamically;
+        defined->noDeadStrip |= noDeadStrip;
+
+        if (auto concatIsec = dyn_cast_or_null<ConcatInputSection>(isec))
+          concatIsec->wasCoalesced = true;
         return defined;
----------------
oontvoo wrote:
> int3 wrote:
> > why are we moving these outside the `if` block? we should be coalescing away the subsection associated with the weak symbol, but not the subsection associated with the non-weak symbol
> Yes, for this if-branch (ie., both are weak, then we're coalescing the new one)
> For the other branch, we're coalescing the weak symbol's (ie., the old one)
oh right. okay yeah I was confusing myself


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112977/new/

https://reviews.llvm.org/D112977



More information about the llvm-commits mailing list