[all-commits] [llvm/llvm-project] 7e115d: [lld-macho] Make everything PIE by default

Jez Ng via All-commits all-commits at lists.llvm.org
Thu Apr 29 12:11:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e115da5df47dbbbef141987845c1258f0c52874
      https://github.com/llvm/llvm-project/commit/7e115da5df47dbbbef141987845c1258f0c52874
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-04-29 (Thu, 29 Apr 2021)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/MachO/Options.td
    M lld/test/MachO/x86-64-reloc-unsigned.s

  Log Message:
  -----------
  [lld-macho] Make everything PIE by default

Modern versions of macOS (>= 10.7) and in general all modern Mach-O
target archs want PIEs by default. ld64 defaults to PIE for iOS >= 4.3,
as well as for all versions of watchOS and simulators. Basically all the
platforms LLD is likely to target want PIE. So instead of cluttering LLD's
code with legacy version checks, I think it's simpler to just default to
PIE for everything.

Note that `-no_pie` still works, so users can still opt out of it.

Reviewed By: #lld-macho, thakis, MaskRay

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


  Commit: d9c8ffa958b7725e7d3a2231701ab20eb477b9ee
      https://github.com/llvm/llvm-project/commit/d9c8ffa958b7725e7d3a2231701ab20eb477b9ee
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-04-29 (Thu, 29 Apr 2021)

  Changed paths:
    A lld/test/MachO/arm-relocs.s
    M lld/test/MachO/header.s

  Log Message:
  -----------
  [lld-macho][nfc] Clean up header.s test

I don't think it's super worthwhile to test the dylib headers outputs of
all the different archs when x86_64 is the only one that has interesting
behavior.

Motivated by my upcoming addition of arm32...


Compare: https://github.com/llvm/llvm-project/compare/a6d92a971175...d9c8ffa958b7


More information about the All-commits mailing list