[PATCH] D101119: [lld-macho] Have tests default to targeting 10.15

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 17:30:32 PDT 2021


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a project: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

D101114 <https://reviews.llvm.org/D101114> enforced proper version checks, which exposed a variety of version
mismatch issues in our tests. We previously changed the test inputs to
target 10.0, which was the simpler thing to do, but we should really
just have our lit.local.cfg default to targeting 10.15, which is what is done
here. We're not likely to ever have proper support for the older versions
anyway, as that would require more work for unclear benefit; for instance,
llvm-mc seems to generate a different compact unwind format for older macOS
versions, which would cause our compact-unwind.s test to fail.

Targeting 10.15 by default causes the following behavioral changes:

- `__mh_execute_header` is now a section symbol instead of an absolute symbol
- LC_BUILD_VERSION gets emitted instead of LC_VERSION_MIN_MACOSX. The former is 32 bytes in size whereas the latter is 16 bytes, so a bunch of hardcoded address offsets in our tests had to be updated.
- >= 10.6 executables are PIE by default

Note that this diff is stacked atop of a local revert of most of the test
changes in rG8c17a875150f8e736e8f9061ddf084397f45f4c5 <https://reviews.llvm.org/rG8c17a875150f8e736e8f9061ddf084397f45f4c5>, to make review easier.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101119

Files:
  lld/test/MachO/export-trie.s
  lld/test/MachO/lit.local.cfg
  lld/test/MachO/load-command-sequence.s
  lld/test/MachO/local-got.s
  lld/test/MachO/map-file.s
  lld/test/MachO/mh-header-link.s
  lld/test/MachO/objc.s
  lld/test/MachO/symtab.s
  lld/test/MachO/x86-64-reloc-unsigned.s
  lld/test/MachO/x86-64-relocs.s
  lld/test/MachO/x86-64-stubs.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101119.339826.patch
Type: text/x-patch
Size: 11599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/c1fcfb25/attachment.bin>


More information about the llvm-commits mailing list