[PATCH] D107533: [lld-macho] Handle encoding personalities of same names but different kinds
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 16 11:24:25 PDT 2021
oontvoo marked 2 inline comments as done.
oontvoo 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
----------------
int3 wrote:
> 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.
Ok - let's try that - it might be simpler. (I wasn't super in favour of that because we might end up special-casing a lot of things ... in which case, it would've been better to do it in a separate pass, as attempted here).
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