[PATCH] D89012: [lld-macho] Support linking against stub dylibs
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 14:58:06 PDT 2020
int3 created this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
int3 requested review of this revision.
Stub dylibs differ from "real" dylibs in that they lack any content in
their sections. What they do have are export tries and symbol tables,
which means we can still link against them. I (jezng) am unclear how to
properly create these stub dylibs; XCode 11.3's `lipo` is able to create
stub dylibs, but those lack LC_ID_DYLIB load commands and are considered
invalid by most tooling. Newer versions of `lipo` aren't able to create
stub dylibs at all. However, recent SDKs in XCode still come with valid
stub dylibs, so it still seems worthwhile to support them. The YAML in
this diff's test was generated by taking a non-stub dylib and editing
the appropriate fields.
Test Plan:
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89012
Files:
lld/MachO/Driver.cpp
lld/test/MachO/dylib-stub.yaml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89012.296804.patch
Type: text/x-patch
Size: 5134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201007/d56d3754/attachment.bin>
More information about the llvm-commits
mailing list