site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brendan Creane wrote: | Has anyone figured out a way to infer the size of an object in the data | segment of a Mach-O dynamic library? This is straight-forward under Linux | – the dl_info struct, as returned by a call to dladdr(), has a “size_t | dli_size” field that reports the size of the nearest symbol. | | My hope is that there’s an official API to do this, or at least an API | that is likely to be supported in the future. | | My fall-back strategy is to store the size (using sizeof at compile time) | in a related symbol. Clunky, but workable. My linux man page does not show a field named dli_size in the DL_info struct. I see dli_fname, dli_fbase, dli_sname, dli_saddr, which is the same as the DL_info structure in Mac OS X. What are you trying to do? Peter -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Darwin) iQCVAwUBRAKEBLiDAg3OZTLPAQJ9GQP9HJubcHfMQHpGGyrFHwTgYiPj1siS/S5L LKcbYQzbtD8+yTHMNrsll8ekh1MEwRTeqpSJkmo7QpZL3EtWWEEc3B2cExBqf7Vt 3Sij2OSn6OYE/Xtt7jGZv5lBtLhN7hVVndpYhTB3+mejCu0rnwxd8fUmJ60ailB7 s7KdNC1vgJ8= =h0bj -----END PGP SIGNATURE----- _______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Peter O'Gorman