Skip to content

Instantly share code, notes, and snippets.

@carlokok
Created May 28, 2019 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlokok/f62ea93028c6fffeae10fc9f6f44d5e8 to your computer and use it in GitHub Desktop.
Save carlokok/f62ea93028c6fffeae10fc9f6f44d5e8 to your computer and use it in GitHub Desktop.
diff --git a/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp b/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
index e4d3029fd..ba49d2507 100644
--- a/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
+++ b/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
@@ -1569,6 +1569,8 @@ uint32_t Util::fileFlags() {
flags |= MH_TWOLEVEL | MH_NOUNDEFS;
if ((_ctx.outputMachOType() == MH_EXECUTE) && _ctx.PIE())
flags |= MH_PIE;
+ if ((_ctx.outputMachOType() == MH_DYLIB))
+ flags |= MH_NO_REEXPORTED_DYLIBS;
if (_hasTLVDescriptors)
flags |= (MH_PIE | MH_HAS_TLV_DESCRIPTORS);
return flags;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment