I have a shared object(dll). How do i find out what all symbols are exported from that?
+1
A:
see man nm
GNU nm lists the symbols from object files objfile.... If no object files are listed as arguments, nm assumes the file a.out.
VolkerK
2009-08-06 08:24:55
btw: for shared objects you need the -D/--dynamic option. e.g. nm -D libmagic.so
VolkerK
2009-08-06 08:28:42
+1
A:
Usually, you would also have a header file that you include in your code to access the symbols.
Ryan Fox
2009-08-06 08:25:30
+2
A:
Do you have a "shared object" (usually a shared library on AIX
), a UNIX
shared library, or a Windows DLL
? These are all different things, and your question conflates them all :-(
For AIX
shared object, use "dump -Tv /path/to/foo.o"
For an ELF
shared library, use "readelf -s /path/to/libfoo.so"
, or (if you have GNU nm) "nm -D /path/to/libfoo.so"
For a non-ELF UNIX shared library, please state which UNIX you are interested in.
For a Windows DLL
, use "dumpbin /EXPORTS foo.dll"
.
Employed Russian
2009-08-09 04:17:40