site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=IlW9M++Ix5ZpU5VydxeytW12h1j1lk3D3HECq0JUgr9GgbD9x5yJTyrMs7dHQQ8RgDOiRQA3UBl+g4nlZMXyNlNggaBD5UerGXl0IC9Wfek75U58NK+tXyC/b0FtFuLKXhTUu3Ag/Dsr9fWi+DnHs001ew+29lOOvABN6Lg3vso= Spencer Nielsen _______________________________________________ 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... Does anybody know offhand a good way to get a code image's mach_header (for use with getsectdatafromheader) of a specific file? In 10.3 I used the structure that dlopen returned (dlstatus) and it had a pointer right in there. However, things have changed in 10.4 and dlopen now returns a different structure (dlopen_handle). The structure returned now contains the NSModule for the file among other things. I tried running through all the loaded images with _dyld_get_image_header and comparing the names (using _dyld_get_image_name) with the NSNameOfModule() called on the NSModule in the structure returned by dlopen but NSNameOfModule() always returns nil. I know that depending on what is returned by dlopen is probably not the best of strategies (perhaps that is why the man page still documents it as returning void*). All I need to be able to do it get the mach_header of code images that I am loading in with dlopen. Thanks! This email sent to site_archiver@lists.apple.com