With DL, is there a way to ask for the symbols that exist within a module that I've loaded? For instance, once I've done... module_handle = DL::dlopen('my_lib') Can I then ask module_handle for an array of symbols? I can't see a likely looking method in there, and it seems like it'd be very nice to have that kind of introspection available. Off topic, can someone give me a good entry point for OS X's tool chain for looking inside dynamic libraries, and understanding the subject in general? I really found myself struggling! The only really constructive thing I found out last night was that on OS X, you need to ask cgg to make you: -dynamiclib This let me try an example out (which worked, wooO!), but I've no idea where these things are usually kept (somewhere in bundles?). Or how I can peek about in one. Cheers, Benjohn
on 2006-05-26 09:11
on 2006-05-26 16:26
On Fri, 26 May 2006, Benjohn Barnes wrote: > > Cheers, > Benjohn it's not exactly what you're asking, but try strings libname.so on the command line. another useful command is ldd libname.so also man ld.so hth. -a
on 2006-05-26 16:49
On Fri, May 26, 2006 at 11:24:15PM +0900, firstname.lastname@example.org wrote: [...] } it's not exactly what you're asking, but try } } strings libname.so } } on the command line. } } another useful command is } } ldd libname.so } } also } } man ld.so Actually, /usr/bin/nm is probably a better bet than any of these. } hth. } -a --Greg
on 2006-05-26 16:55
On Fri, 26 May 2006, Gregory Seidman wrote: > } ldd libname.so > } > } also > } > } man ld.so > > Actually, /usr/bin/nm is probably a better bet than any of these. indeed. i'm still drinking my coffee! ;-) -a
on 2006-05-27 01:02
On 26 May 2006, at 15:53, email@example.com wrote: >> } > indeed. i'm still drinking my coffee! ;-) Brilliant :) Thanks Ara and Greg - they look good.
on 2006-05-27 01:11
On 26 May 2006, at 23:59, Benjohn Barnes wrote: >>> } strings libname.so >>> >>> Actually, /usr/bin/nm is probably a better bet than any of these. >> >> indeed. i'm still drinking my coffee! ;-) > > Brilliant :) Thanks Ara and Greg - they look good. Interesting that objective c methods are verbosely described in a symbol table. From the man pages of nm: > If the symbol is a Objective C method, the symbol > name is > +-[Class_name(category_name) method:name:], where `+' is > for class > methods, `-' is for instance methods, and (category_name) > is present > only when the method is in a category. I don't remember if objective c method signatures are typed though, or if all of the parameters must be object ids? If the later's the case, then you've got just about everything you need in the symbol table and the header isn't really needed.