site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thanks for the quick reply Greg. -- Greg Parker gparker@apple.com Runtime Wrangler _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On Jul 12, 2009, at 10:50 PM, Aron-Zvi wrote: How do I scan the load commands? Read mach-o/loader.h. Step through the load commands, starting just after the mach_header (or mach_header_64). Use load_command->cmd to check for LC_UNIXTHREAD, and use load_command->cmdsize to find the next load command. * The load commands directly follow the mach_header. The total size of all * of the commands is given by the sizeofcmds field in the mach_header. All * load commands must have as their first two fields cmd and cmdsize. The cmd * field is filled in with a constant for that command type. Each command type * has a structure specifically for it. The cmdsize field is the size in bytes * of the particular load command structure plus anything that follows it that * is a part of the load command (i.e. section structures, strings, etc.). To * advance to the next load command the cmdsize can be added to the offset or * pointer of the current load command. This email sent to site_archiver@lists.apple.com