Created
May 28, 2019 14:52
-
-
Save LemonBoy/e676bab499ab9e98de195f5fceba0ef0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp b/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp | |
index e93ca86c..4f1e264f 100644 | |
--- a/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp | |
+++ b/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp | |
@@ -1630,6 +1630,14 @@ normalizedFromAtoms(const lld::File &atomFile, | |
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 the MH_NO_REEXPORTED_DYLIBS flag | |
+ size_t numExportedDylibs = normFile.dependentDylibs.size(); | |
+ if (numExportedDylibs == 0) | |
+ normFile.flags = normFile.flags | MH_NO_REEXPORTED_DYLIBS; | |
+ } | |
+ | |
util.copySegmentInfo(normFile); | |
util.copySectionInfo(normFile); | |
util.assignAddressesToSections(normFile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment