Resolving "Insufficient Gap" Errors

You need to ensure that there is an adequate gap between the file header commands and the code in your application or dynamic library. In the event that you still receive an Insufficient Gap error message, you can implement the following option as a solution.

NOTE   Following Gap adjustment, gaps are filled and encrypted. Any subsequent changes (for example, by applying an additional utility to the files, might compromise the integrity of the protected Mach-O binary.

Building a Project using the Headerpad Option

You can add space between a file header and a Macho-O code segment using a linker. The following procedure is an example of how to use the headerpad option via X-code v.3.1.

NOTE   You can also specify a headerpad value using other compilers, or a command line.

1.Open a project file using X-code v.3.1.

2.Click Info to display the project's properties.

3.Navigate to Linking > Other Linking Flags.

4.In the Other Linking Flags field, type:

-Wi,-headerpad,hexValue.

where hexValue is the amount of required space between the header and the code segment.

For example:

-Wi,-headerpad,0x3000.

Related Topics

Mac Default Protection Settings Screen