site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORunt... -Andrew On Apr 18, 2008, at 12:41 PM, Army Research Lab wrote: Thanks, Cem Karan On 4/17/08 8:49 PM, "Godfrey van der Linden" <gvdl@mac.com> wrote: Yeah I agree with Stephen. Reading the mach-o header directly will probably be more robust than depending on the output of nm. There is some fairly easy to understand code in the kernel sources that parses the fat and mach-o headers. Cheers Godfrey On 2008-04-18, at 0:24 , stephen joseph butler wrote: Can anyone fill me in on what those unknown sections are? I briefly looked at the Mac OS X ABI Mach-O File Format Reference (http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORun time/Reference/reference.html), which is where I got the few definitions I have above, but I'd like to know more. Have you checked the headers in /usr/include/mach-o/? Poking around loader.h, I see defines for some of your sections with some quick comments. There might be more information hidden in other files. _______________________________________________ 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/gvdl%40mac.com _______________________________________________ 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/amyrick%40apple.com _______________________________________________ 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... Send your questions to the list; I'm sure there are a few of us who have dealt with mach-o parsing before who would be happy to help. Also, check out this document: While it's not as complete as the headers in /usr/include/mach-o/, it still contains good information. OK, just started reading it... that is going to take me a while to fully figure out. If/when I get into trouble, do you mind if I ask you questions? See xnu/libsa/kld_patch.c: kld_file_map(). There is a lot of other stuff in there that you don't need but the parsing of the fat and mach- o headers are fairly straight forward. I know this code pretty well since I wrote it ;-). On Wed, Apr 16, 2008 at 9:36 AM, Army Research Lab <ckaran@arl.army.mil wrote: This email sent to gvdl@mac.com This email sent to amyrick@apple.com This email sent to site_archiver@lists.apple.com