[all-commits] [llvm/llvm-project] 319181: [lld-macho] Fix alignment of TLV data sections

Mike Hommey via All-commits all-commits at lists.llvm.org
Tue Dec 28 16:27:15 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 319181f7671868be6cd4865e9bcc63f6ba2ddb06
      https://github.com/llvm/llvm-project/commit/319181f7671868be6cd4865e9bcc63f6ba2ddb06
  Author: Mike Hommey <mh at glandium.org>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M lld/MachO/Writer.cpp
    M lld/test/MachO/tlv.s

  Log Message:
  -----------
  [lld-macho] Fix alignment of TLV data sections

References from thread-local variable sections are treated as offsets
relative to the start of the thread-local data memory area, which is
initialized via copying all the TLV data sections (which are all
contiguous). If later data sections require a greater alignment than
earlier ones, the offsets of data within those sections won't be
guaranteed to aligned unless we normalize alignments. We therefore use
the largest alignment for all TLV data sections.

Reviewed By: #lld-macho, int3

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




More information about the All-commits mailing list