[PATCH] D107533: [lld-macho] Handle encoding personalities of same names but different kinds
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 13 22:49:44 PDT 2021
int3 added inline comments.
================
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
----------------
oontvoo wrote:
> int3 wrote:
> > omg... I assume you've verified that this what ld64 does? this seems super bizarre. It's not even a valid total order!
> Yeah - the last two I could understand a little. The first two are completely unexpected.
> Now that we're here, actually. I, personally, would be fine with LLD re-defining its own rules - as long as it's consistent.
>
> (The problem I'm trying to fix here is the duplicate personality symbols - hence as long as we have a set of rules to pick one, i'm good)
> Any inclination on which way to go from here?
I was thinking we could special-case just local symbols. For each local personality symbol, we check the symbol table to see if an entry with the same name exists there. If so, we replace the relocation's reference to the local symbol with the symbol in the symbol table.
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