[all-commits] [llvm/llvm-project] 17271e: [lld/mac] Give __DATA, __thread_ptrs type S_THREAD_...

Nico Weber via All-commits all-commits at lists.llvm.org
Sat Jun 19 09:57:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 17271ece0da69c4dde0bbab60883b7fdd05be131
      https://github.com/llvm/llvm-project/commit/17271ece0da69c4dde0bbab60883b7fdd05be131
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-06-19 (Sat, 19 Jun 2021)

  Changed paths:
    M lld/MachO/SyntheticSections.cpp
    M lld/MachO/SyntheticSections.h
    M lld/test/MachO/tlv-dylib.s
    M lld/test/MachO/tlv.s

  Log Message:
  -----------
  [lld/mac] Give __DATA,__thread_ptrs type S_THREAD_LOCAL_VARIABLE_POINTERS

...instead of S_NON_LAZY_SYMBOL_POINTERS. This matches ld64.

Part of PR50769.

While here, also remove an old TODO that was done in D87178.

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


  Commit: c931e12b1d517ca2d0b1dbcb90f65b770046ef3e
      https://github.com/llvm/llvm-project/commit/c931e12b1d517ca2d0b1dbcb90f65b770046ef3e
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-06-19 (Sat, 19 Jun 2021)

  Changed paths:
    M lld/MachO/OutputSegment.cpp
    M lld/test/MachO/tlv-dylib.s

  Log Message:
  -----------
  [lld/mac] Make sure __thread_ptrs is in front of __thread_bss

The exact location doesn't matter, but it should be in front
of __thread_bss. We put it right in front of __thread_data
which is where ld64 seems to put it as well.

Fixes PR50769.

(As mentioned on the bug, there is probably a more structural
fix too, see comment 5. If we don't address this, it's likely
we'll run into this again with other synthetic sections. But
for now, let's fix the immediate breakage.)

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


Compare: https://github.com/llvm/llvm-project/compare/b9c05aff205b...c931e12b1d51


More information about the All-commits mailing list