Nick Ing-Simmons wrote:
> What does 'truss' show as happening ?
Another good tool is the debugging stuff in ld.so.1. Use 'LD_DEBUG=help
sleep 1' to see all the available options. LD_DEBUG=files is a good
place to start. There is an example below.
--
Alan Burlison
Solaris Kernel Development, Sun Microsystems
$ LD_DEBUG=files perl -MCPAN -e exit
136348:
136348: configuration file=/var/ld/ld.config: unable to process file
136348:
136348:
136348: file=ld.so.1 [ ELF ]
136348: dynamic: 0xff3e2d10 base: 0xff3b0000
136348: envp: 0xffbef110 auxv: 0xffbef1f0
136348:
136348: file=/home1/software/perl/debug/bin/perl [ ELF ]; generating
link map
136348: dynamic: 0x2d238 base: 0x10000 size: 0x1d760
136348: entry: 0x11500 phdr: 0x10034 phnum: 5
136348: lmid: 0x0
136348:
136348: file=perl; analyzing [ RTLD_LAZY RTLD_GLOBAL RTLD_WORLD
RTLD_NODELETE ]
136348:
136348: file=libperl.so; needed by perl
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/CORE/libperl.so
[ ELF ]; generating link map
136348: dynamic: 0xff31a750 base: 0xff200000 size: 0x12a000
136348: entry: 0xff200094 phdr: 0xff200034 phnum: 3
136348: lmid: 0x0
136348:
136348: file=libsocket.so.1; needed by perl
136348: file=/usr/lib/libsocket.so.1 [ ELF ]; generating link map
136348: dynamic: 0xff35a8d8 base: 0xff340000 size: 0x1c000
136348: entry: 0xff340094 phdr: 0xff340034 phnum: 3
136348: lmid: 0x0
136348:
136348: file=libnsl.so.1; needed by perl
136348: file=/usr/lib/libnsl.so.1 [ ELF ]; generating link map
136348: dynamic: 0xff19e0d8 base: 0xff100000 size: 0xaa000
136348: entry: 0xff100094 phdr: 0xff100034 phnum: 3
136348: lmid: 0x0
136348:
136348: file=libdl.so.1; needed by perl
136348: file=/usr/lib/libdl.so.1 [ ELF ]; generating link map
136348: dynamic: 0xff390198 base: 0xff390000 size: 0x2000
136348: entry: 0xff390074 phdr: 0xff390034 phnum: 2
136348: lmid: 0x0
136348:
136348: file=libc.so.1; needed by perl
136348: file=/usr/lib/libc.so.1 [ ELF ]; generating link map
136348: dynamic: 0xff0ba494 base: 0xff000000 size: 0xc0000
136348: entry: 0xff01cbe4 phdr: 0xff000034 phnum: 3
136348: lmid: 0x0
136348:
136348: file=libcrypt_i.so.1; needed by perl
136348: file=/usr/lib/libcrypt_i.so.1 [ ELF ]; generating link map
136348: dynamic: 0xff1f21b0 base: 0xff1e0000 size: 0x14000
136348: entry: 0xff1e0094 phdr: 0xff1e0034 phnum: 3
136348: lmid: 0x0
136348:
136348: file=libsec.so.1; needed by perl
136348: file=/usr/lib/libsec.so.1 [ ELF ]; generating link map
136348: dynamic: 0xff1d2174 base: 0xff1c0000 size: 0x14000
136348: entry: 0xff1c0094 phdr: 0xff1c0034 phnum: 3
136348: lmid: 0x0
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/CORE/libperl.so;
analyzing [ RTLD_LAZY RTLD_GLOBAL RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=/usr/lib/libsocket.so.1; analyzing [ RTLD_LAZY
RTLD_GLOBAL RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=libnsl.so.1; needed by /usr/lib/libsocket.so.1
136348:
136348: file=libc.so.1; needed by /usr/lib/libsocket.so.1
136348:
136348: file=/usr/lib/libnsl.so.1; analyzing [ RTLD_LAZY RTLD_GLOBAL
RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=libdl.so.1; needed by /usr/lib/libnsl.so.1
136348:
136348: file=libc.so.1; needed by /usr/lib/libnsl.so.1
136348:
136348: file=libmp.so.2; needed by /usr/lib/libnsl.so.1
136348: file=/usr/lib/libmp.so.2 [ ELF ]; generating link map
136348: dynamic: 0xff0f4184 base: 0xff0e0000 size: 0x16000
136348: entry: 0xff0e0094 phdr: 0xff0e0034 phnum: 3
136348: lmid: 0x0
136348:
136348: file=/usr/lib/libdl.so.1; analyzing [ RTLD_LAZY RTLD_GLOBAL
RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=/usr/lib/libc.so.1; analyzing [ RTLD_LAZY RTLD_GLOBAL
RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=libdl.so.1; needed by /usr/lib/libc.so.1
136348:
136348: file=/usr/lib/libcrypt_i.so.1; analyzing [ RTLD_LAZY
RTLD_GLOBAL RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=libgen.so.1; needed by /usr/lib/libcrypt_i.so.1
136348: file=/usr/lib/libgen.so.1 [ ELF ]; generating link map
136348: dynamic: 0xfeff63bc base: 0xfefe0000 size: 0x18000
136348: entry: 0xfefe0094 phdr: 0xfefe0034 phnum: 3
136348: lmid: 0x0
136348:
136348: file=libc.so.1; needed by /usr/lib/libcrypt_i.so.1
136348:
136348: file=/usr/lib/libsec.so.1; analyzing [ RTLD_LAZY RTLD_GLOBAL
RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=libc.so.1; needed by /usr/lib/libsec.so.1
136348:
136348: file=/usr/lib/libmp.so.2; analyzing [ RTLD_LAZY RTLD_GLOBAL
RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=libc.so.1; needed by /usr/lib/libmp.so.2
136348:
136348: file=/usr/lib/libgen.so.1; analyzing [ RTLD_LAZY RTLD_GLOBAL
RTLD_WORLD RTLD_NODELETE ]
136348:
136348: file=libc.so.1; needed by /usr/lib/libgen.so.1
136348:
136348: file=/usr/lib/libc.so.1; filter for
/usr/platform/$PLATFORM/lib/libc_psr.so.1
136348:
136348: file=/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1; filtered by
/usr/lib/libc.so.1
136348: file=/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1 [ ELF ];
generating link map
136348: dynamic: 0xff0d012c base: 0xff0d0000 size: 0x4000
136348: entry: 0xff0d0074 phdr: 0xff0d0034 phnum: 2
136348: lmid: 0x0
136348:
136348: file=/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1; analyzing
[ RTLD_LAZY RTLD_LOCAL RTLD_GROUP RTLD_WORLD RTLD_NODELETE ]
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/CORE/libperl.so;
modifying memory protections (+ PROT_WRITE)
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/CORE/libperl.so;
modifying memory protections (- PROT_WRITE)
136348:
136348: file=/usr/lib/libdl.so.1; filter for /usr/lib/ld.so.1
136348:
136348: file=/usr/lib/ld.so.1; filtered by /usr/lib/libdl.so.1
136348:
136348: calling .init (from sorted order): /usr/lib/libc.so.1
136348:
136348:
136348: calling .init (done): /usr/lib/libc.so.1
136348:
136348:
136348: calling .init (from sorted order): /usr/lib/libmp.so.2
136348:
136348:
136348: calling .init (done): /usr/lib/libmp.so.2
136348:
136348:
136348: calling .init (from sorted order): /usr/lib/libnsl.so.1
136348:
136348:
136348: calling .init (done): /usr/lib/libnsl.so.1
136348:
136348:
136348: calling .init (from sorted order):
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/CORE/libperl.so
136348:
136348:
136348: calling .init (done):
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/CORE/libperl.so
136348:
136348:
136348: calling .init (from sorted order): /usr/lib/libsocket.so.1
136348:
136348:
136348: calling .init (done): /usr/lib/libsocket.so.1
136348:
136348:
136348: calling .init (from sorted order): /usr/lib/libgen.so.1
136348:
136348:
136348: calling .init (done): /usr/lib/libgen.so.1
136348:
136348:
136348: calling .init (from sorted order): /usr/lib/libcrypt_i.so.1
136348:
136348:
136348: calling .init (done): /usr/lib/libcrypt_i.so.1
136348:
136348:
136348: calling .init (from sorted order): /usr/lib/libsec.so.1
136348:
136348:
136348: calling .init (done): /usr/lib/libsec.so.1
136348:
136348:
136348: file=/usr/lib/libsocket.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libcrypt_i.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libsec.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libmp.so.2 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libgen.so.1 unused: does not satisfy any
references
136348:
136348:
136348: transferring control: perl
136348:
136348:
136348: file=/usr/lib/locale/en_GB.ISO8859-1/en_GB.ISO8859-1.so.2;
dlopen() called from file=/usr/lib/libc.so.1 [ RTLD_LAZY RTLD_LOCAL
RTLD_GROUP RTLD_WORLD ]
136348: file=/usr/lib/locale/en_GB.ISO8859-1/en_GB.ISO8859-1.so.2 [ ELF
]; generating link map
136348: dynamic: 0xfefd3b44 base: 0xfefc0000 size: 0x16000
136348: entry: 0xfefc0094 phdr: 0xfefc0034 phnum: 3
136348: lmid: 0x0
136348:
136348: file=/usr/lib/locale/en_GB.ISO8859-1/en_GB.ISO8859-1.so.2;
analyzing [ RTLD_LAZY RTLD_LOCAL RTLD_GROUP RTLD_WORLD ]
136348:
136348: file=libc.so.1; needed by
/usr/lib/locale/en_GB.ISO8859-1/en_GB.ISO8859-1.so.2
136348:
136348: calling .init (from sorted order):
/usr/lib/locale/en_GB.ISO8859-1/en_GB.ISO8859-1.so.2
136348:
136348:
136348: calling .init (done):
/usr/lib/locale/en_GB.ISO8859-1/en_GB.ISO8859-1.so.2
136348:
136348:
136348: file=/usr/lib/libsocket.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libcrypt_i.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libsec.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libmp.so.2 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libgen.so.1 unused: does not satisfy any
references
136348:
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/IO/IO.so;
dlopen() called from file=perl [ RTLD_LAZY RTLD_LOCAL RTLD_GROUP
RTLD_WORLD ]
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/IO/IO.so
[ ELF ]; generating link map
136348: dynamic: 0xfefb3e04 base: 0xfefa0000 size: 0x16000
136348: entry: 0xfefa0094 phdr: 0xfefa0034 phnum: 3
136348: lmid: 0x0
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/IO/IO.so;
analyzing [ RTLD_LAZY RTLD_LOCAL RTLD_GROUP RTLD_WORLD ]
136348:
136348: calling .init (from sorted order):
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/IO/IO.so
136348:
136348:
136348: calling .init (done):
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/IO/IO.so
136348:
136348:
136348: file=/usr/lib/libsocket.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libcrypt_i.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libsec.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libmp.so.2 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libgen.so.1 unused: does not satisfy any
references
136348:
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Fcntl/Fcntl.so;
dlopen() called from file=perl [ RTLD_LAZY RTLD_LOCAL RTLD_GROUP
RTLD_WORLD ]
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Fcntl/Fcntl.so
[ ELF ]; generating link map
136348: dynamic: 0xfef930c8 base: 0xfef80000 size: 0x14000
136348: entry: 0xfef80094 phdr: 0xfef80034 phnum: 3
136348: lmid: 0x0
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Fcntl/Fcntl.so;
analyzing [ RTLD_LAZY RTLD_LOCAL RTLD_GROUP RTLD_WORLD ]
136348:
136348: calling .init (from sorted order):
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Fcntl/Fcntl.so
136348:
136348:
136348: calling .init (done):
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Fcntl/Fcntl.so
136348:
136348:
136348: file=/usr/lib/libsocket.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libcrypt_i.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libsec.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libmp.so.2 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libgen.so.1 unused: does not satisfy any
references
136348:
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Opcode/Opcode.so;
dlopen() called from file=perl [ RTLD_LAZY RTLD_LOCAL RTLD_GROUP
RTLD_WORLD ]
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Opcode/Opcode.so
[ ELF ]; generating link map
136348: dynamic: 0xfef75168 base: 0xfef60000 size: 0x16000
136348: entry: 0xfef60094 phdr: 0xfef60034 phnum: 3
136348: lmid: 0x0
136348:
136348:
file=/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Opcode/Opcode.so;
analyzing [ RTLD_LAZY RTLD_LOCAL RTLD_GROUP RTLD_WORLD ]
136348:
136348: calling .init (from sorted order):
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Opcode/Opcode.so
136348:
136348:
136348: calling .init (done):
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Opcode/Opcode.so
136348:
136348:
136348: file=/usr/lib/libsocket.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libcrypt_i.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libsec.so.1 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libmp.so.2 unused: does not satisfy any
references
136348:
136348:
136348: file=/usr/lib/libgen.so.1 unused: does not satisfy any
references
136348:
136348:
136348: calling .fini:
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Opcode/Opcode.so
136348:
136348:
136348: calling .fini:
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/Fcntl/Fcntl.so
136348:
136348:
136348: calling .fini:
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/auto/IO/IO.so
136348:
136348:
136348: calling .fini:
/usr/lib/locale/en_GB.ISO8859-1/en_GB.ISO8859-1.so.2
136348:
136348:
136348: calling .fini: /usr/lib/libsec.so.1
136348:
136348:
136348: calling .fini: /usr/lib/libcrypt_i.so.1
136348:
136348:
136348: calling .fini: /usr/lib/libgen.so.1
136348:
136348:
136348: calling .fini: /usr/lib/libsocket.so.1
136348:
136348:
136348: calling .fini:
/home1/software/perl/debug/lib/5.6.0/sun4-solaris-multi-64int/CORE/libperl.so
136348:
136348:
136348: calling .fini: /usr/lib/libnsl.so.1
136348:
136348:
136348: calling .fini: /usr/lib/libmp.so.2
136348:
136348:
136348: calling .fini: /usr/lib/libc.so.1
136348: