[all-commits] [llvm/llvm-project] 03f43b: [lld] Initial commit for new Mach-O backend

Jez Ng via All-commits all-commits at lists.llvm.org
Tue Mar 31 11:59:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 03f43b3aca363e16c45d8733400fd0083b1af4d8
      https://github.com/llvm/llvm-project/commit/03f43b3aca363e16c45d8733400fd0083b1af4d8
  Author: Jez Ng <jezng at fb.com>
  Date:   2020-03-31 (Tue, 31 Mar 2020)

  Changed paths:
    M lld/CMakeLists.txt
    A lld/MachO/Arch/X86_64.cpp
    A lld/MachO/CMakeLists.txt
    A lld/MachO/Config.h
    A lld/MachO/Driver.cpp
    A lld/MachO/Driver.h
    A lld/MachO/InputFiles.cpp
    A lld/MachO/InputFiles.h
    A lld/MachO/InputSection.cpp
    A lld/MachO/InputSection.h
    A lld/MachO/Options.td
    A lld/MachO/OutputSegment.cpp
    A lld/MachO/OutputSegment.h
    A lld/MachO/SymbolTable.cpp
    A lld/MachO/SymbolTable.h
    A lld/MachO/Symbols.cpp
    A lld/MachO/Symbols.h
    A lld/MachO/Target.cpp
    A lld/MachO/Target.h
    A lld/MachO/Writer.cpp
    A lld/MachO/Writer.h
    M lld/include/lld/Common/Driver.h
    A lld/test/MachO/alignment-too-large.yaml
    A lld/test/MachO/arch.s
    A lld/test/MachO/duplicate-symbol.s
    A lld/test/MachO/entry-symbol.s
    A lld/test/MachO/invalid-executable.s
    A lld/test/MachO/load-commands.s
    A lld/test/MachO/no-such-file.s
    A lld/test/MachO/relocations.s
    A lld/test/MachO/section-headers.s
    A lld/test/MachO/segments.s
    A lld/test/MachO/silent-ignore.test
    A lld/test/MachO/text-segment.s
    M lld/tools/lld/CMakeLists.txt
    M lld/tools/lld/lld.cpp

  Log Message:
  -----------
  [lld] Initial commit for new Mach-O backend

Summary:
This is the first commit for the new Mach-O backend, designed to roughly
follow the architecture of the existing ELF and COFF backends, and
building off work that @ruiu and @pcc did in a branch a while back. Note
that this is a very stripped-down commit with the bare minimum of
functionality for ease of review. We'll be following up with more diffs
soon.

Currently, we're able to generate a simple "Hello World!" executable
that runs on OS X Catalina (and possibly on earlier OS X versions; I
haven't tested them). (This executable can be obtained by compiling
`test/MachO/relocations.s`.) We're mocking out a few load commands to
achieve this -- for example, we can't load dynamic libraries, but
Catalina requires binaries to be linked against `dyld`, so we hardcode
the emission of a `LC_LOAD_DYLIB` command. Other mocked out load
commands include LC_SYMTAB and LC_DYSYMTAB.

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




More information about the All-commits mailing list