Hi Rod, Thanks a lot for the reply and it is very useful.
mdb document seems to be very large. Do we have a quick user guide for the same. Regards Deepak Bhatia -----Original Message----- From: Rod Evans [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 09, 2007 4:27 AM To: DEEPAK BHATIA Cc: opensolaris-discuss@opensolaris.org Subject: Re: [osol-discuss] Debug the Dynamic Linker DEEPAK BHATIA wrote: > Can anyone please suggest how to proceed ? How do I tell the OS to invoke my > dynamic linker instead of the original one. You can explicitly invoke a different runtime linker: oxpoly 428. cp /usr/lib/ld.so.1 /tmp/ld.so.1 oxpoly 429. /tmp/ld.so.1 /bin/cat & [1] 17398 oxpoly 430. pmap 17398 17398: /tmp/ld.so.1 /bin/cat 00010000 16K r-x-- /usr/bin/cat 00024000 8K rwx-- /usr/bin/cat ........ FF3B0000 208K r-x-- /tmp/ld.so.1 FF3F4000 8K rwx-- /tmp/ld.so.1 You can also embed the name of a non-default runtime linker within an application: oxpoly 435. LD_OPTIONS=-I/tmp/ld.so.1 cc -o main main.c oxpoly 436. elfdump -i main Interpreter Section: .interp /tmp/ld.so.1 I use mdb(1) to debug ld.so.1, plus there are some helper functions available from our mdb module. See http://docs.sun.com/app/docs/doc/817-1984/6mhm7pl1k?a=view And, don't forget printf's :-) They are easy to add, and it takes just seconds to rebuild ld.so.1. -- Rod _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org