dlinfo on android?

721 views
Skip to first unread message

Divij Kumar

unread,
Mar 26, 2009, 10:30:31 AM3/26/09
to andro...@googlegroups.com

I have existing C code that uses dlinfo to get the details about the current running process. I use dlopen(NULL) to get a handle to the current process, and do a dlinfo on it.

 

However dlinfo isn’t available on Android (see /bionic/libc/includes/dlfcn.h) or do nm on libdl.so

Is there plan to support it. Is there an alternative?

 

Thanks,

 

David Turner

unread,
Mar 26, 2009, 12:58:20 PM3/26/09
to andro...@googlegroups.com
There is no plan right now. Please file a bug on b.android.com about this if you need it.

Thanks in advance

Romil Mittal

unread,
Mar 26, 2009, 1:12:27 PM3/26/09
to andro...@googlegroups.com

Iliyan Malchev

unread,
Mar 26, 2009, 1:22:11 PM3/26/09
to andro...@googlegroups.com
Correct me if I am wrong, but this is not Linux functionality, is it?
AFAIK it's only on Solaris.

Romil Mittal

unread,
Mar 26, 2009, 1:25:28 PM3/26/09
to andro...@googlegroups.com
This works fine on both Linux and Solaris.

-romil

Divij Kumar

unread,
Mar 26, 2009, 1:26:23 PM3/26/09
to andro...@googlegroups.com

Iliyan Malchev

unread,
Mar 26, 2009, 1:30:27 PM3/26/09
to andro...@googlegroups.com
Yes, dlopen/dlclose/dlerror/dlsym are, but dlinfo?

David Turner

unread,
Mar 26, 2009, 1:33:04 PM3/26/09
to andro...@googlegroups.com
dlinfo is not posix but implemented by glibc's dynamic linker

Divij Kumar

unread,
Mar 26, 2009, 1:35:23 PM3/26/09
to andro...@googlegroups.com
You may try the following:
nm -D libdl.so

relevant o/p
000013b0 T dladdr
00001400 T dladdr1
00000ca0 T dlclose
00001170 T dlerror
00001490 T dlinfo
00001760 T dlmopen
00000ae0 T dlopen
000018d0 T dlopen
00000cf0 T dlsym
00000dd0 W dlvsym

Dlinfo is supported on most linux distros.

Not supported on MacOS X 10.3, NetBSD 3.0, OpenBSD 3.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, Interix 3.5, BeOS. (source: http://www.gnu.org/software/hello/manual/gnulib/dlinfo.html)
Reply all
Reply to author
Forward
0 new messages