Fix "JIT session error: Symbols not found: [ DW.ref.__gxx_personality_v0 ] error" which happens when trying to use exceptions on ppc linux. To do this, it expands AutoClaimSymbols option in RTDyldObjectLinkingLayer to also claim weak symbols before they are tried to be resovled. In ppc linux, DW.ref symbols is emitted as weak hidden symbols in the later stage of MC pipeline. This means when using IRLayer (i.e. LLJIT), IRLayer will not claim responsibility for such symbols and RuntimeDyld will skip defining this symbol even though it couldn't resolve corresponding external symbol.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Thanks for the patch! I think this is the right way forward.
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp | ||
---|---|---|
752 ↗ | (On Diff #442728) | What about further conditions like isOSLinux() or isOSBinFormatELF()? The issue seems quite specific and AutoClaimResponsibility should be used with care. Intuitively, it seems we should tightening it to the exact platform as much as we can. It would also reduce the risk of breaking legacy use-cases downstream (which is the majority of RuntimeDyld users I think). Are there good reasons why we wouldn't? |
llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp | ||
154 | SymbolStringPool::intern() involves a mutex lock and a string-map traversal. Might be worth doing it only once where ever we can. |
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp | ||
---|---|---|
752 ↗ | (On Diff #442728) | thanks for review! Yes, there was no paticular reason for not restricting the target. |
SymbolStringPool::intern() involves a mutex lock and a string-map traversal. Might be worth doing it only once where ever we can.