[all-commits] [llvm/llvm-project] 55e9eb: [lld-macho] Support -order_file

Jez Ng via All-commits all-commits at lists.llvm.org
Tue May 19 07:47:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 55e9eb416ee5af91d519a0b7d550c549f18257b0
      https://github.com/llvm/llvm-project/commit/55e9eb416ee5af91d519a0b7d550c549f18257b0
  Author: Jez Ng <jezng at fb.com>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M lld/MachO/Config.h
    M lld/MachO/Driver.cpp
    M lld/MachO/InputFiles.cpp
    M lld/MachO/MergedOutputSection.h
    M lld/MachO/Options.td
    M lld/MachO/OutputSection.h
    M lld/MachO/OutputSegment.cpp
    M lld/MachO/OutputSegment.h
    M lld/MachO/SyntheticSections.cpp
    M lld/MachO/SyntheticSections.h
    M lld/MachO/Writer.cpp
    A lld/test/MachO/invalid/order-file-bad-arch.test
    A lld/test/MachO/invalid/order-file-bad-objfile.test
    A lld/test/MachO/order-file.s

  Log Message:
  -----------
  [lld-macho] Support -order_file

The order file indicates how input sections should be sorted within each
output section, based on the symbols contained within those sections.

This diff sets the stage for implementing and testing
`.subsections_via_symbols`, where we will break up InputSections by each
symbol and sort them more granularly.

Reviewed By: smeenai

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


  Commit: e270b2f1727c0fbde2676e8d0340c0d934726d3c
      https://github.com/llvm/llvm-project/commit/e270b2f1727c0fbde2676e8d0340c0d934726d3c
  Author: Jez Ng <jezng at fb.com>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/MachO/InputFiles.cpp
    M lld/MachO/InputFiles.h
    M lld/MachO/InputSection.cpp
    M lld/MachO/InputSection.h
    A lld/test/MachO/subsections-section-relocs.s
    A lld/test/MachO/subsections-symbol-relocs.s

  Log Message:
  -----------
  [lld-macho] Support .subsections_via_symbols

This diff restores and builds upon @pcc and @ruiu's initial work on
subsections.

The .subsections_via_symbols directive indicates we can split each
section along symbol boundaries, unless those symbols have been marked
with `.alt_entry`.

We exercise this functionality in our tests by using order files that
rearrange those symbols.

Reviewed By: smeenai

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


  Commit: 1f820e35596bac036a7f759c4de41fcc2e642719
      https://github.com/llvm/llvm-project/commit/1f820e35596bac036a7f759c4de41fcc2e642719
  Author: Jez Ng <jezng at fb.com>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M lld/MachO/Arch/X86_64.cpp
    M lld/MachO/InputFiles.cpp
    M lld/MachO/InputSection.cpp
    M lld/MachO/InputSection.h
    M lld/MachO/Target.h
    A lld/test/MachO/x86-64-reloc-unsigned.s

  Log Message:
  -----------
  [lld-macho] Support X86_64_RELOC_UNSIGNED

Note that it's only used for non-pc-relative contexts.

Reviewed By: MaskRay, smeenai

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


Compare: https://github.com/llvm/llvm-project/compare/cff9399f6b90...1f820e35596b


More information about the All-commits mailing list