Following the load commands is the rest of the Mach-O binary, which largely consists of the actual binary code. This data is organized into the segments described by the LC_SEGMENT_64 Mach-O Load Commands

__TEXT segment contains executable code and data that is read-only. Common sections within this segment may include:

  • __text: Compiled binary code
  • __const: Constant data
  • __cstring: String constants

On the other hand, the __DATA segment contains data that is writeable. A few of the more common sections within this segment include:

  • __data: Global variables (those that have been initialized)
  • __bss: Static variables (those that have not been initialized)
  • _objc* (__objc_classlist, __objc_protolis): Information used by the Objective-C runtime