[PATCH] D129175: [ORC] Fix weak hidden symbols failure on PPC with runtimedyld

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 05:39:24 PDT 2022


sgraenitz added a comment.

Thanks for the patch! I think this is the right way forward.



================
Comment at: llvm/lib/ExecutionEngine/Orc/LLJIT.cpp:752
+    Layer->setAutoClaimResponsibilityForObjectSymbols(true);
+
   // FIXME: Explicit conversion to std::unique_ptr<ObjectLayer> added to silence
----------------
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?


================
Comment at: llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:154
+
+        ExtraSymbolsToClaim[ES.intern(*SymName)] = *SymFlags;
+        continue;
----------------
`SymbolStringPool::intern()` involves a mutex lock and a string-map traversal. Might be worth doing it only once where ever we can.


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

https://reviews.llvm.org/D129175



More information about the llvm-commits mailing list