[PATCH] D62568: lld/mach-o should set MH_NO_REEXPORTED_DYLIBS if there are no REEXPORT_DYLIB libraries
Carlo Kok via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 22:33:08 PDT 2019
carlokok updated this revision to Diff 201825.
carlokok added a comment.
Remove unused var
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62568/new/
https://reviews.llvm.org/D62568
Files:
lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
Index: lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
===================================================================
--- lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
+++ lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
@@ -1631,6 +1631,17 @@
normFile.pageSize = context.pageSize();
normFile.rpaths = context.rpaths();
util.addDependentDylibs(atomFile, normFile);
+ if (context.outputMachOType() == MH_DYLIB) {
+ // If we're not re-exporting any dylib set MH_NO_REEXPORTED_DYLIBS
+ normFile.flags = normFile.flags | MH_NO_REEXPORTED_DYLIBS;
+ for (DependentDylib § : normFile.dependentDylibs) {
+ if (sect.kind == llvm::MachO::LC_REEXPORT_DYLIB) {
+ normFile.flags = normFile.flags &~ MH_NO_REEXPORTED_DYLIBS;
+ break;
+ }
+ }
+ }
+
util.copySegmentInfo(normFile);
util.copySectionInfo(normFile);
util.assignAddressesToSections(normFile);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62568.201825.patch
Type: text/x-patch
Size: 933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190529/f75d4c6c/attachment.bin>
More information about the llvm-commits
mailing list