Re: dlsym(...) and Intel Macs
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com - Jordan On Jul 17, 2006, at 7:08 PM, Damien Sorresso wrote: int *debug_addr = (int *)dlsym(mainHandle, "__debug_level"); Damien Sorresso "A mathematician is a device for turning coffee into theorems." -Paul Erdos _______________________________________________ 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/jkh%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... Have you tried removing one of the prefixing underscores? It could be that the prefixing rules have changed, though I haven't heard anything to that effect.. Does dlsym(...) not work the same on Intel Macs? I have some symbol loading code that works just fine on PowerPC Macs, but on Intel Macs, it returns NULL. Here is a line. This loads the symbol named `__debug_level'. This code is executed from a dynamically-loaded bundle, and it loads the address of the symbol from the main executable. On PowerPC, I get the address you'd get by doing `nm' on the executable. On Intel Macs, I get NULL. Any ideas what's happening here? -- This email sent to jkh@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Jordan K. Hubbard