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

Moritz Sichert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 27 06:33:21 PDT 2021


MoritzS added a comment.

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

> What was the previous behavior when we encountered these relocations?
>
> My only concern here is avoiding regressing existing users if we turn a previously unsupported (but silently accepted) relocation into a potential link-time error. It's perverse, but this kind of improvement to functionality and error checking has caused problems for clients before, and the main aim for MCJIT / RuntimeDyld right now is stability.
>
> If the new support could cause a problem then I think the best solution would be to add a 'bool supportsTLV' method to the memory manager that we can query before running any of the TLV code.

All relocations that are not implemented will eventually lead to `report_fatal_error("Relocation type not implemented yet!");` in `resolveX86_64Relocation()`. Whereas with my changes it will reach `report_fatal_error("allocation of TLS not implemented");` in `MemoryManager::allocateTLSSection()`. So in both cases the execution crashes, it just prints a different error message now.


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