[PATCH] D97865: [lld-macho] Bind re-exported symbols directly to implicitly-linked umbrellas
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 11:37:26 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5d9aafc09ab5: [lld-macho] Bind re-exported symbols directly to implicitly-linked umbrellas (authored by int3).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97865/new/
https://reviews.llvm.org/D97865
Files:
lld/MachO/InputFiles.cpp
lld/test/MachO/implicit-dylibs.s
Index: lld/test/MachO/implicit-dylibs.s
===================================================================
--- lld/test/MachO/implicit-dylibs.s
+++ lld/test/MachO/implicit-dylibs.s
@@ -24,7 +24,7 @@
# RUN: %lld -dylib -lSystem %t/libunused.o -o %t/usr/lib/libunused.dylib -install_name /usr/lib/libunused.dylib
## Bar.framework is nested within Foo.framework.
-# RUN: %lld -dylib -lSystem %t/framework-baz.o -o %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar \
+# RUN: %lld -dylib -lSystem %t/framework-bar.o -o %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar \
# RUN: -install_name /System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar
# RUN: ln -sf %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar \
# RUN: %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Bar
@@ -35,7 +35,7 @@
# RUN: -install_name /System/Library/Frameworks/Foo.framework/Versions/A/Foo
# RUN: ln -sf %t/System/Library/Frameworks/Foo.framework/Versions/A/Foo %t/System/Library/Frameworks/Foo.framework/Foo
-# RUN: %lld -dylib -lSystem %t/framework-bar.o -o %t/Baz.framework/Versions/A/Baz \
+# RUN: %lld -dylib -lSystem %t/framework-baz.o -o %t/Baz.framework/Versions/A/Baz \
# RUN: -install_name %t/Baz.framework/Versions/A/Baz
# RUN: ln -sf %t/Baz.framework/Versions/A/Baz %t/Baz.framework/Baz
@@ -54,7 +54,7 @@
# CHECK-DAG: __DATA __data {{.*}} pointer 0 libtoplevel _toplevel
# CHECK-DAG: __DATA __data {{.*}} pointer 0 libreexporter _sublevel
# CHECK-DAG: __DATA __data {{.*}} pointer 0 Foo _framework_foo
-# CHECK-DAG: __DATA __data {{.*}} pointer 0 libreexporter _framework_bar
+# CHECK-DAG: __DATA __data {{.*}} pointer 0 Foo _framework_bar
# CHECK-DAG: __DATA __data {{.*}} pointer 0 libreexporter _framework_baz
# CHECK-DAG: __DATA __data {{.*}} pointer 0 libc++abi ___gxx_personality_v0
Index: lld/MachO/InputFiles.cpp
===================================================================
--- lld/MachO/InputFiles.cpp
+++ lld/MachO/InputFiles.cpp
@@ -669,7 +669,7 @@
const auto *c = reinterpret_cast<const dylib_command *>(cmd);
StringRef reexportPath =
reinterpret_cast<const char *>(c) + read32le(&c->dylib.name);
- loadReexport(reexportPath, umbrella, nullptr);
+ loadReexport(reexportPath, exportingFile, nullptr);
}
// FIXME: What about LC_LOAD_UPWARD_DYLIB, LC_LAZY_LOAD_DYLIB,
@@ -741,7 +741,7 @@
interface.getParent() == nullptr ? &interface : interface.getParent();
for (InterfaceFileRef intfRef : interface.reexportedLibraries())
- loadReexport(intfRef.getInstallName(), umbrella, topLevel);
+ loadReexport(intfRef.getInstallName(), exportingFile, topLevel);
}
ArchiveFile::ArchiveFile(std::unique_ptr<object::Archive> &&f)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97865.328256.patch
Type: text/x-patch
Size: 2889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210304/f8d439f2/attachment.bin>
More information about the llvm-commits
mailing list