[all-commits] [llvm/llvm-project] 7f1955: [ELF] Support mixed TLSDESC and TLS GD

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Jan 10 10:03:33 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f1955dc96407cbee58b8a78a21f56372db334d6
      https://github.com/llvm/llvm-project/commit/7f1955dc96407cbee58b8a78a21f56372db334d6
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-01-10 (Mon, 10 Jan 2022)

  Changed paths:
    M lld/ELF/InputSection.cpp
    M lld/ELF/Relocations.cpp
    M lld/ELF/Symbols.h
    M lld/ELF/SyntheticSections.cpp
    M lld/ELF/SyntheticSections.h
    M lld/test/ELF/x86-64-tlsdesc-gd-mixed.s

  Log Message:
  -----------
  [ELF] Support mixed TLSDESC and TLS GD

We only support both TLSDESC and TLS GD for x86 so this is an x86-specific
problem. If both are used, only one R_X86_64_TLSDESC is produced and TLS GD
accesses will incorrectly reference R_X86_64_TLSDESC. Fix this by introducing
SymbolAux::tlsDescIdx.

Reviewed By: ikudrin

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




More information about the All-commits mailing list