Skip to content

When I run my protected Mach-O binary, I get an error message saying "malformed mach-o image: _TEXT segment maps start of file but is writable"

By default, the Virtual Machine registers and code share a section, making it both writable and executable. To place the registers and code in separate sections:

  1. See the C example in /StealthMode/C/StealthCodeRegsArea.

Its Readme.txt explains how to create one Stealth Area for VM code and another for VM registers.

  1. Add this line in Advanced Options:

OPTION_PROTECTION_PRESERVE_SECTIONS_FLAGS=YES

  1. Select Stealth Mode in Protection Options.

  2. Protect the application again.