[PATCH] D105466: [RuntimeDyld] Implemented relocation of TLS symbols in ELF

Moritz Sichert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 6 01:37:33 PDT 2021


MoritzS added a comment.

In D105466#2984334 <https://reviews.llvm.org/D105466#2984334>, @lhames wrote:

> Ok. I've just realized that there's also a danger on the flip-side too: code containing TLVs will be accepted, but this only support accessing them on one thread, which will be surprising to some clients. I think it would be worth adding an "enablePartialTLVSupport" method to the memory manager (which should default to false), and gating this new feature on that. If you're happy to do that before the code lands then that's great, otherwise I'm happy to do it in-tree after it lands.

I implemented the single-thread only handling of TLS only in `llvm-rtdyld.cpp`. The default implementation in the memory manager is to always crash with the fatal error. So this should only be a problem if someone uses `llvm-rtdyld -execute` with an object file that has TLS relocations which previously crashed but now silently succeeds but will lead to incorrect execution when multiple threads are used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105466



More information about the llvm-commits mailing list