Commit Graph

864 Commits

Author SHA1 Message Date
Vincent Lee 58edaef3fe [lld-macho] Do not error out on dead stripped duplicate symbols
Builds that error out on duplicate symbols can still succeed if the symbols
will be dead stripped. Currently, this is the current behavior in ld64.
https://github.com/apple-oss-distributions/ld64/blob/main/src/ld/Resolver.cpp#L2018.
In order to provide an easier to path for adoption, introduce a new flag that will
retain compatibility with ld64's behavior (similar to `--deduplicate-literals`). This is
turned off by default since we do not encourage this behavior in the linker.

Reviewed By: #lld-macho, thakis, int3

Differential Revision: https://reviews.llvm.org/D134794
2022-09-30 15:09:27 -07:00
Daniel Bertalan f546165754
[lld-macho] Don't create entries in isecPriorities during sorting (NFC)
If a value for a given key is not present, `DenseMap::operator[]`
default-constructs one, which is wasteful when we don't do anything with
it afterwards. Fix it by calling `lookup()` instead which only returns
the default value, but does not modify the map.

This speeds up linking a fair bit when only a small portion of all
sections are specified in the order file, like in the case of Chromium
Framework:

      N           Min           Max        Median           Avg        Stddev
  x  25      3.727684     3.8808699      3.753552     3.7702461     0.0397282
  +  25     3.6469049     3.7523289     3.6764321     3.6841622   0.025525047
  Difference at 95.0% confidence
  	-0.0860839 +/- 0.0189924
  	-2.28324% +/- 0.503745%
  	(Student's t, pooled s = 0.0333906)

Differential Revision: https://reviews.llvm.org/D134811
2022-09-28 16:50:18 +02:00
Bernhard Urban-Forster 2769ceb0e7 [lld-macho] Fix -force_symbols_{,not_}weak_list arg type
This is still undocumented and unsupported, but if someone passed it before you
would end up with a missing file error since this takes an argument that
wouldn't be handled.

Differential Revision: https://reviews.llvm.org/D133854
2022-09-27 10:36:40 -04:00
Daniel Bertalan d2f3d7bad2
[lld-macho] Force higher alignment for __thread_vars
`__thread_vars` contains pointers to `__tlv_bootstrap`, which are fixed
up by dyld; however the section's alignment is not specified. This means
that the relocations might end up on odd addresses, which is not
representable by the soon to be added chained fixups.

This is arguably a bug in MC, but this behavior has been there since TLV
support was originally added.

This patch forces the `__thread_vars` sections to be aligned to the
target's pointer size. This is done by ld64 as well.

Differential Revision: https://reviews.llvm.org/D134594
2022-09-25 08:02:07 +02:00
Vy Nguyen 016c2f5e32 [lld-macho] Support -dyld_env
This arg is undocumented but from looking at the code + experiment, it's used to add additional DYLD_ENVIRONMENT load commands to the output.

Differential Revision: https://reviews.llvm.org/D134058
2022-09-20 10:16:45 -04:00
Daniel Bertalan 3493f1a107
[lld-macho] Simplify base address calculation for init offsets (NFC) 2022-09-17 10:23:05 +02:00
Daniel Bertalan a8843ec952
[lld-macho] Parallelize linker optimization hint processing
This commit moves the parsing of linker optimization hints into
`ARM64::applyOptimizationHints`. This lets us avoid allocating memory
for holding the parsed information, and moves work out of
`ObjFile::parse`, which is not parallelized at the moment.

This change reduces the overhead of processing LOHs to 25-30 ms when
linking Chromium Framework on my M1 machine; previously it took close to
100 ms.

There's no statistically significant change in runtime for a --threads=1
link.

Performance figures with all 8 cores utilized:

      N           Min           Max        Median           Avg        Stddev
  x  20     3.8027232     3.8760762     3.8505335     3.8454145   0.026352574
  +  20     3.7019017     3.8660538     3.7546209     3.7620371   0.032680043
  Difference at 95.0% confidence
  	-0.0833775 +/- 0.019
  	-2.16823% +/- 0.494094%
  	(Student's t, pooled s = 0.0296854)

Differential Revision: https://reviews.llvm.org/D133439
2022-09-16 17:38:46 +02:00
Jez Ng d515575714 [lld-macho][reland] Add support for N_INDR symbols
This is similar to the `-alias` CLI option, but it gives finer-grained
control in that it allows the aliased symbols to be treated as private
externs.

While working on this, I realized that our `-alias` handling did not
cover the cases where the aliased symbol is a common or dylib symbol,
nor the case where we have an undefined that gets treated specially and
converted to a defined later on. My N_INDR handling neglects this too
for now; I've added checks and TODO messages for these.

`N_INDR` symbols cropped up as part of our attempt to link swift-stdlib.

Reviewed By: #lld-macho, thakis, thevinster

Differential Revision: https://reviews.llvm.org/D133825
2022-09-15 22:57:15 -04:00
Nico Weber c28f4e3f04 Revert "[lld-macho] Add support for N_INDR symbols"
This reverts commit 5b8da10b87.
Breaks tests, see https://reviews.llvm.org/D133825
2022-09-15 11:17:48 -04:00
Jez Ng 5b8da10b87 [lld-macho] Add support for N_INDR symbols
This is similar to the `-alias` CLI option, but it gives finer-grained
control in that it allows the aliased symbols to be treated as private
externs.

While working on this, I realized that our `-alias` handling did not
cover the cases where the aliased symbol is a common or dylib symbol,
nor the case where we have an undefined that gets treated specially and
converted to a defined later on. My N_INDR handling neglects this too
for now; I've added checks and TODO messages for these.

`N_INDR` symbols cropped up as part of our attempt to link swift-stdlib.

Reviewed By: #lld-macho, thakis, thevinster

Differential Revision: https://reviews.llvm.org/D133825
2022-09-15 08:35:24 -04:00
Jez Ng 118bfde90a [lld-macho] Have ICF dedup explicitly-defined selrefs
This is what ld64 does (though it doesn't use ICF to do this; instead it
always dedups selrefs by default).

We'll want to dedup implicitly-defined selrefs as well, but I will leave
that for future work.

Additionally, I'm not *super* happy with the current LLD implementation
because I think it is rather janky and inefficient. But at least it
moves us toward the goal of closing the size gap with ld64. I've
described ideas for cleaning up our implementation here:
https://github.com/llvm/llvm-project/issues/57714

Differential Revision: https://reviews.llvm.org/D133780
2022-09-14 17:59:22 -04:00
Jez Ng 8d4ca09d06 [lld-macho][nfc] Clean up ICF code
Split these changes out from https://reviews.llvm.org/D133780.
2022-09-14 17:59:22 -04:00
Nico Weber cd7ffa2e52 lld: Include name of output file in "failed to write output" diag
Differential Revision: https://reviews.llvm.org/D133110
2022-09-14 14:57:47 -04:00
Jez Ng 3925ea4172 [lld-macho][nfci] Don't include null terminator in StringRefs
So @keith observed
[here](https://reviews.llvm.org/D128108#inline-1263900) that the
StringRefs we were returning from `CStringInputSection::getStringRef()`
included the null terminator in their total length, but regular
StringRefs do not. Let's fix that so these StringRefs are less confusing
to use.

Reviewed By: #lld-macho, keith, Roger

Differential Revision: https://reviews.llvm.org/D133728
2022-09-13 21:23:48 -04:00
Daniel Bertalan 025a5b22c8
[lld-macho] Sort data-in-code entries
Previously, we would add entries to DataInCodeSection in the order they
appeared in input files. Because of this, entries would not be sorted if
sections were reordered due to e.g. `-order_file` or call graph profile
sorting. ld64 always keeps data-in-code information sorted.

This commit also fixes an incorrect assertion. The original assertion
from D103006 used to check that data-in-code entries are sorted in the
input objects -- likely because we use binary search on that data. In
D115556, the assertion was moved into `collectDataInCodeEntries`, but
the checked variable's name was not changed, so it ended up checking the
final contents of the DataInCodeSection.

We no longer crash when building LLVM with PGO using an asserts build of
LLD as the linker.

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1265937

Numbers for linking the Chromium Framework reproducer from #48001, which
has 6829 data-in-code entries:

  x before
  + after
      N           Min           Max        Median           Avg        Stddev
  x  20     2.1076453     2.3059683     2.1132485     2.1350302   0.049905767
  +  20     2.1069031     2.3915262       2.14465     2.1728429   0.084065898
  No difference proven at 95.0% confidence

Differential Revision: https://reviews.llvm.org/D133581
2022-09-13 19:08:35 +02:00
Leonard Grey a5764912fb [lld-macho] Hardlink -object_path_lto files to cache when possible
This is a follow-up to https://reviews.llvm.org/D131624 (specifically to https://reviews.llvm.org/D131624#3716584)

Differential revision: https://reviews.llvm.org/D133218
2022-09-07 14:27:43 -04:00
Michael Eisel 0f9590af27 Add docs for Mach-O lld
I wasn't able to find any docs for Mach-O in `lld/docs`, so here's an attempt at adding basic docs. One of my goals here is to make it easy for users who are unfamiliar with linkers to successfully use lld.

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D132893
2022-09-06 12:24:35 -04:00
Daniel Bertalan a8ec90ad9c
[lld-macho] Simplify linker optimization hint processing
This commit removes the `relocTargets` vector, and instead makes the
code reconstruct the referent addresses from the relocated instructions.
This will allow us to move `applyOptimizationHints` from
`ConcatInputSection::writeTo` to a separate pass that parses and applies
LOHs in one step, on a per-file basis. This will improve performance, as
parsing is currently done serially in `ObjFile::parse`.

I opted to remove the sanity check that ensures that all relocations
within a LOH point to the same symbol. This completely eliminates the
need to search through relocations. It is my understanding that
mismatched relocation targets should not be present in valid object
files, so it's unlikely that the removal will lead to mislinks.

Differential Revision: https://reviews.llvm.org/D133274
2022-09-06 08:19:08 +02:00
Daniel Bertalan 1b65d20961
[lld-macho] Diagnose unaligned arm64 PAGEOFF12 relocations
The LDR and STR instructions store their immediate offsets as a multiple
of the load/store's size. Therefore, if the target address is not
aligned, the relocation is not representable. We now emit an error if
that happens, similarly to ld64.

This commit removes a test case from loh-adrp-ldr.s that contained an
unaligned LDR.

Differential Revision: https://reviews.llvm.org/D133269
2022-09-05 16:58:51 +02:00
Daniel Bertalan 4f688d00f4
[lld-macho] Change constant std::vector to std::array (NFC) 2022-09-04 22:43:02 +02:00
Kazu Hirata 32aa35b504 Drop empty string literals from static_assert (NFC)
Identified with modernize-unary-static-assert.
2022-09-03 11:17:47 -07:00
Daniel Bertalan f7b752d277
[lld-macho] Set the SG_READ_ONLY flag on __DATA_CONST
This flag instructs dyld to make the segment read-only after fixups have
been performed.

I'm not sure why this flag is needed, as on macOS 13 beta at least,
__DATA_CONST is read-only even without this flag; but ld64 sets it as
well.

Differential Revision: https://reviews.llvm.org/D133010
2022-08-31 17:04:20 +02:00
Jez Ng 824a28819e [lld-macho][nfc] Simplify MarkLive.cpp using `if constexpr`
No significant perf diff, as expected.

             base           diff           difference (95% CI)
  sys_time   1.722 ± 0.030  1.727 ± 0.027  [  -0.6% ..   +1.2%]
  user_time  5.081 ± 0.032  5.087 ± 0.030  [  -0.2% ..   +0.4%]
  wall_time  6.008 ± 0.056  6.029 ± 0.053  [  -0.1% ..   +0.8%]
  samples    25             37

Reviewed By: #lld-macho, oontvoo, thakis, BertalanD

Differential Revision: https://reviews.llvm.org/D133014
2022-08-31 10:40:04 -04:00
Daniel Bertalan 389e0a81a1
[lld-macho] Support synthesizing __TEXT,__init_offsets
This section stores 32-bit `__TEXT` segment offsets of initializer
functions, and is used instead of `__mod_init_func` when chained fixups
are enabled.

Storing the offsets lets us avoid emitting fixups for the initializers.

Differential Revision: https://reviews.llvm.org/D132947
2022-08-31 10:13:45 +02:00
Daniel Bertalan ae5d5426fb
[lld-macho] Rename {StubHelper,ObjCStubs}Section::setup() to setUp (NFC)
The phrasal verb is spelled "set up"; "setup" is a noun.

Suggested in https://reviews.llvm.org/D132947#inline-1280089
2022-08-30 18:30:14 +02:00
Shoaib Meenai 56bd3185cd [MachO] Don't fold compact unwind entries with LSDA
Folding them will cause the unwinder to compute the incorrect function
start address for the folded entries, which in turn will cause the
personality function to interpret the LSDA incorrectly and break
exception handling.

You can verify the end-to-end flow by creating a simple C++ file:
```
void h();
int main() { h(); }
```

and then linking this file against the liblsda.dylib produced by the
test case added here. Before this change, running the resulting program
would result in a program termination with an uncaught exception.
Afterwards, it works correctly.

Reviewed By: #lld-macho, thevinster

Differential Revision: https://reviews.llvm.org/D132845
2022-08-30 12:34:19 +05:00
Shoaib Meenai f0c00942a5 [MachO] Remove stale comments
https://reviews.llvm.org/D93267 implemented handling more than 127
compact unwind encodings, and https://reviews.llvm.org/D123435 and
https://reviews.llvm.org/D124561 implemented stripping redundant
__eh_frame entries.
2022-08-29 00:10:33 +05:00
Shoaib Meenai a745e47900 [MachO] Fix dead-stripping __eh_frame
This section is marked S_ATTR_LIVE_SUPPORT in input files, which meant
that on arm64, we were unnecessarily preserving FDEs if we e.g. had
multiple weak definitions for a function. Worse, we would actually
produce an invalid `__eh_frame` section in that case, because the CIE
associated with the unnecessary FDE would still get dead-stripped and
we'd end up with a dangling FDE. We set up associations from functions
to their FDEs, so dead-stripping will just work naturally, and we can
clear S_ATTR_LIVE_SUPPORT from our input `__eh_frame` sections to fix
dead-stripping.

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D132489
2022-08-27 14:54:34 +05:00
Daniel Bertalan 6b6d1abb10
[lld-macho] Move adding bindings for stub targets out of Writer (NFC)
We now re-use the existing needsBinding() helper to determine if a
branch has to go through a stub. The logic for determining which type of
binding is needed is moved inside StubsSection::addEntry().

This is an NFC refactor that simplifies my diff that adds support for
chained fixups.

Differential Revision: https://reviews.llvm.org/D132476
2022-08-25 17:37:36 +02:00
Shoaib Meenai 491a5c9570 [MachO] Fix formatting. NFC
The style guide says that all arms of an if-else should have braces if
any arm does [1].

[1] https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
2022-08-22 23:00:07 +03:00
Kazu Hirata 8b1b0d1d81 Revert "Use std::is_same_v instead of std::is_same (NFC)"
This reverts commit c5da37e42d.

This patch seems to break builds with some versions of MSVC.
2022-08-20 23:00:39 -07:00
Kazu Hirata c5da37e42d Use std::is_same_v instead of std::is_same (NFC) 2022-08-20 22:36:26 -07:00
Kazu Hirata 9e296584ce Fix unused variable warnings
These warnings came up with gcc-11.3.0.
2022-08-20 00:12:35 -07:00
Daniel Bertalan 1b67ce79e3 [lld-macho] Honor weak and thread-local flags for TAPI symbols
Differential Revision: https://reviews.llvm.org/D131995
2022-08-17 07:03:24 +02:00
Nico Weber b696500b9a [lld/mac] Stop accepting arbitrary suffixes on --(no-)warn-dylib-install-name
The flag accidentally used Joined<> instead of Flag<>.

Previously, `--warn-dylib-install-namefoobarbaz` would be accepted and
had the same effect as `-warn-dylib-install-name`. Now the flag only
works if no suffix is attached to it, as originally intended.

Also fix a typo in the flag's help text.

Differential Revision: https://reviews.llvm.org/D131781
2022-08-12 15:27:02 -04:00
Leonard Grey 6c62795058 [lld-macho] Ensure cached objects are affected by `-object_path_lto`
This refactors LTO compile to look more like COFF, where cache hits and misses are all funneled through the same code path.

Previously, cache hits were *not* being saved to -object_path_lto, which led to them sometimes falling out of the cache before dsymutil could process them. As a side effect of the refactor, cached objects are now saved with -save-temps as well, which seems desirable.

(Deleted lld/test/MachO/lto-cache-dsymutil.ll and rolled it into lld/test/MachO/lto-object-path.ll, since the cache-only, non object path approach is unreliable anyway).

Differential Revision: https://reviews.llvm.org/D131624
2022-08-12 10:56:58 -04:00
Nico Weber 39a093471a [lld/mac] Add missing `_eq` suffix on two (internal) option names
No behavior change.
2022-08-12 08:18:52 -04:00
Keith Smiley 3c24fae398
[lld-macho] Add support for objc_msgSend stubs
Apple Clang in Xcode 14 introduced a new feature for reducing the
overhead of objc_msgSend calls by deduplicating the setup calls for each
individual selector. This works by clang adding undefined symbols for
each selector called in a translation unit, such as `_objc_msgSend$foo`
for calling the `foo` method on any `NSObject`. There are 2
different modes for this behavior, the default directly does the setup
for `_objc_msgSend` and calls it, and the smaller option does the
selector setup, and then calls the standard `_objc_msgSend` stub
function.

The general overview of how this works is:

- Undefined symbols with the given prefix are collected
- The suffix of each matching undefined symbol is added as a string to
  `__objc_methname`
- A pointer is added for every method name in the `__objc_selrefs`
  section
- A `got` entry is emitted for `_objc_msgSend`
- Stubs are emitting pointing to the synthesized locations

Notes:

- Both `__objc_methname` and `__objc_selrefs` can also exist from object
  files, so their contents are merged with our synthesized contents
- The compiler emits method names for defined methods, but not for
  undefined symbols you call, but stubs are used for both
- This only implements the default "fast" mode currently just to reduce
  the diff, I also doubt many folks will care to swap modes
- This only implements this for arm64 and x86_64, we don't need to
  implement this for 32 bit iOS archs, but we should implement it for
  watchOS archs in a later diff

Differential Revision: https://reviews.llvm.org/D128108
2022-08-10 17:17:17 -07:00
Nico Weber 09db7f5331 [lld/mac] Remove unusual "Fallthrough" comments
Normally we'd use LLVM_FALLTHROUGH, or now, [[fallthrough]].
But for case labels followed directly by other case labels, we
use neither.

No behavior change.
2022-08-08 14:18:44 -04:00
Nico Weber 2f3256a02e [lld/mac] Use C++17 structured bindings in two more places
No behavior change.
2022-08-08 11:09:44 -04:00
Nico Weber b99da9d255 [lld/mac] Use C++17 structured bindings
No behavior change.

Differential Revision: https://reviews.llvm.org/D131355
2022-08-08 07:21:28 -04:00
Nico Weber bf20d43f82 [lld/mac] Use C++17 nested namespace syntax in most places
Some header files used

    namespace lld {
    namespace macho {
    // ...
    } // namespace macho
    std::string toString(const Type &t);
    } // namespace lld

In those files, I didn't use a nested namespace since it's not a big win there.

No behavior change.

Differential Revision: https://reviews.llvm.org/D131354
2022-08-08 07:11:17 -04:00
Fangrui Song bccdf9197b Revert "[lld-macho] Work around odr-use of const non-inline static data member to fix -O0 build after D128298"
This reverts commit 20b2d3260d.
The workaround is no longer needed for C++17.
2022-08-06 16:44:14 -07:00
Martin Storsjö 59c6f418fa [LLD] [MachO] Fix GCC build warnings
This fixes the following warnings produced by GCC 9:

    ../tools/lld/MachO/Arch/ARM64.cpp: In member function ‘void {anonymous}::OptimizationHintContext::applyAdrpLdr(const lld::macho::OptimizationHint&)’:
    ../tools/lld/MachO/Arch/ARM64.cpp:448:18: warning: comparison of integer expressions of different signedness: ‘int64_t’ {aka ‘long int’} and ‘uint64_t’ {aka ‘long unsigned int’} [-Wsign-compare]
      448 |   if (ldr.offset != (rel1->referentVA & 0xfff))
          |       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../tools/lld/MachO/UnwindInfoSection.cpp: In function ‘bool canFoldEncoding(compact_unwind_encoding_t)’:
    ../tools/lld/MachO/UnwindInfoSection.cpp:404:44: warning: comparison between ‘enum<unnamed>’ and ‘enum<unnamed>’ [-Wenum-compare]
      404 |   static_assert(UNWIND_X86_64_MODE_MASK == UNWIND_X86_MODE_MASK, "");
          |                                            ^~~~~~~~~~~~~~~~~~~~
    ../tools/lld/MachO/UnwindInfoSection.cpp:405:49: warning: comparison between ‘enum<unnamed>’ and ‘enum<unnamed>’ [-Wenum-compare]
      405 |   static_assert(UNWIND_X86_64_MODE_STACK_IND == UNWIND_X86_MODE_STACK_IND, "");
          |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://reviews.llvm.org/D130970
2022-08-03 00:14:39 +03:00
Gabriel Ravier 5dbd8faad5 [lld] Fixed a number of typos
I went over the output of the following mess of a command:

`(ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less)`

and proceeded to spend a few days looking at it to find probable typos
and fixed a few hundred of them in all of the llvm project (note, the
ones I found are not anywhere near all of them, but it seems like a
good start).

Differential Revision: https://reviews.llvm.org/D130982
2022-08-02 09:52:31 -04:00
Jez Ng 6c9f681252 [lld-macho] Support EH frame pointer encodings that use sdata4
Previously we only supporting using the system pointer size (aka the
`absptr` encoding) because `llvm-mc`'s CFI directives always generate EH
frames with that encoding. But libffi uses 4-byte-encoded, hand-rolled
EH frames, so this patch adds support for it.

Fixes #56576.

Reviewed By: #lld-macho, oontvoo

Differential Revision: https://reviews.llvm.org/D130804
2022-07-31 20:16:33 -04:00
Fangrui Song 4b2b68d5ab [lld] Change vector to SmallVector. NFC
My lld executable is 1.6KiB smaller and some functions are now more efficient.
2022-07-30 18:11:21 -07:00
Nico Weber 2681c9e065 [lld/mac] Comment changes requested on https://reviews.llvm.org/D130725
No behavior change.
2022-07-29 12:55:48 -04:00
Nico Weber 241f0e8b76 [lld/mac] Add support for $ld$previous symbols with explicit symbol name
A symbol `$ld$previous$/Another$1.2.3$1$3.0$14.0$_xxx$` means
"pretend symbol `_xxx` is in dylib `/Another` with version `1.2.3`
if the deployment target is between `3.0` and `14.0` and we're
targeting platform `1` (ie macOS)".

This means dylibs can now inject synthetic dylibs into the link, so
DylibFile needs to grow a 3rd constructor.

The only other interesting thing is that such an injected dylib
counts as a use of the original dylib. This patch gets this mostly
right (if _only_ `$ld$previous` symbols are used from a dylib,
we don't add a dep on the dylib itself, matching ld64), but one case
where we don't match ld64 yet is that ld64 even omits the original
dylib when linking it with `-needed-l`. Lld currently still adds a load
command for the original dylib in that case. (That's for a future
patch.)

Fixes #56074.

Differential Revision: https://reviews.llvm.org/D130725
2022-07-28 20:35:48 -04:00
Vincent Lee f030132c72 [lld-macho] Allow linking with ABI compatible architectures
Linking fails when targeting `x86_64-apple-darwin` for runtimes. The issue
is that LLD strictly assumes the target architecture be present in the tbd
files (which isn't always true). For example, when targeting `x86_64h`, it should
work with `x86_64` because they are ABI compatible. This is also inline with what
ld64 does.

An environment variable (which ld64 also supports) is also added to preserve the
existing behavior of strict architecture matching.

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D130683
2022-07-28 17:16:32 -07:00