[all-commits] [llvm/llvm-project] 8dc736: [ELF] Support TLS GD/LD relaxations for x86-32 -fn...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Dec 31 20:51:09 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8dc73662ab5f7c992f9d7778de7c3611c1d5367e
      https://github.com/llvm/llvm-project/commit/8dc73662ab5f7c992f9d7778de7c3611c1d5367e
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-12-31 (Sat, 31 Dec 2022)

  Changed paths:
    M lld/ELF/Arch/X86.cpp
    M lld/test/ELF/i386-tls-gdiele.s
    M lld/test/ELF/i386-tls-opt.s

  Log Message:
  -----------
  [ELF] Support TLS GD/LD relaxations for x86-32 -fno-plt

For x86-32, {clang,gcc} -fno-plt uses `call *___tls_get_addr at GOT(%reg)` instead
of `call ___tls_get_addr at PLT`. GD to IE/LE relaxations need to shift the offset
by one while LD to LE relaxation needs to use a different code sequence.

While here, fix some comments.

Fix https://github.com/llvm/llvm-project/issues/59769

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




More information about the All-commits mailing list