[all-commits] [llvm/llvm-project] 30b6c5: [ORC][ORC_RT][AArch64] Implement TLS descriptor in...

Sunho Kim via All-commits all-commits at lists.llvm.org
Wed Jul 6 04:13:31 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30b6c51f515e633d6a798ddb82d4591d597670e9
      https://github.com/llvm/llvm-project/commit/30b6c51f515e633d6a798ddb82d4591d597670e9
  Author: Sunho Kim <ksunhokim123 at gmail.com>
  Date:   2022-07-06 (Wed, 06 Jul 2022)

  Changed paths:
    M compiler-rt/lib/orc/CMakeLists.txt
    M compiler-rt/lib/orc/elfnix_platform.cpp
    A compiler-rt/lib/orc/elfnix_tls.aarch64.S
    A compiler-rt/test/orc/TestCases/Linux/aarch64/trivial-tls.S
    M llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
    M llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp
    M llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
    M llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp

  Log Message:
  -----------
  [ORC][ORC_RT][AArch64] Implement TLS descriptor in ELFNixPlatform.

Implements TLS descriptor relocations in JITLink ELF/AARCH64 backend and support the relevant runtime functions in ELFNixPlatform.

Unlike traditional TLS model, TLS descriptor model requires linker to return the "offset" from thread pointer via relocaiton not the actual pointer to thread local variable. There is no public libc api for adding new allocations to TLS block dynamically which thread pointer points to. So, we support this by taking delta from thread base pointer to the actual thread local variable in our allocated section.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D128601




More information about the All-commits mailing list