[PATCH] D107533: Handle encoding personalities of same names but different kinds.

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 22:57:48 PDT 2021


int3 added inline comments.


================
Comment at: lld/MachO/UnwindInfoSection.cpp:158-159
+// a Dylib symbol with the same name.
+// We do this because sometimes personality symbols are intentionally
+// defined as a local symbol as hack to get around another bug. As
+// a result, often we see two of the same personality symbols but different
----------------
hm, what do you mean "intentionally defined ... as a hack to get around another bug"? Did you figure out why `ld -r` is emitting these local symbols?


================
Comment at: lld/MachO/UnwindInfoSection.cpp:188-191
+    //    - if all 3 present, local is picked
+    //    - if {dylib, local}, dylib is picked
+    //    - if {dylib, global}, global
+    //    - if {local, global}, local
----------------
omg... I assume you've verified that this what ld64 does? this seems super bizarre. It's not even a valid total order!


================
Comment at: lld/MachO/UnwindInfoSection.cpp:192
+    //    - if {local, global}, local
+    // Also record  a mapping of their personalies to be used later in encoding.
+
----------------



================
Comment at: lld/MachO/UnwindInfoSection.cpp:226
+
+  // Lastly resolve <internal> personalityes.
+  for (const Defined *iSym : internalSyms) {
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107533



More information about the llvm-commits mailing list