
16.1 Debugging
16.1.1 Specifying the Required Library:
ldd
Use the command
ldd
to find out which libraries would load the dynamic executable
specified as argument.
tester@linux:~> ldd /bin/ls
linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib/librt.so.1 (0xb7f97000)
libacl.so.1 => /lib/libacl.so.1 (0xb7f91000)
libc.so.6 => /lib/libc.so.6 (0xb7e79000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7e67000)
/lib/ld-linux.so.2 (0xb7fb6000)
libattr.so.1 => /lib/libattr.so.1 (0xb7e63000)
Static binaries do not need any dynamic libraries.
tester@linux:~> ldd /bin/sash
not a dynamic executable
tester@linux:~> file /bin/sash
/bin/sash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.6.4, statically linked, for GNU/Linux 2.6.4, stripped
16.1.2 Library Calls of a Program Run:
ltrace
The command
ltrace
enables you to trace the library calls of a process. This command
is used in a similar fashion to
strace
. The parameter
-c
outputs the number and du-
ration of the library calls that have occurred:
tester@linux:~> ltrace -c find ~
% time seconds usecs/call calls function
------ ----------- ----------- --------- --------------------
34.37 6.758937 245 27554 __errno_location
33.53 6.593562 788 8358 __fprintf_chk
12.67 2.490392 144 17212 strlen
11.97 2.353302 239 9845 readdir64
2.37 0.466754 27 16716 __ctype_get_mb_cur_max
308
Installation and Administration
Содержание LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007
Страница 1: ...SUSE Linux Enterprise Server www novell com 10 May 11 2007 Installation and Administration...
Страница 14: ......
Страница 19: ...Part I Deployment...
Страница 20: ......
Страница 60: ......
Страница 128: ......
Страница 243: ...Part II Administration...
Страница 244: ......
Страница 274: ......
Страница 312: ......
Страница 348: ......
Страница 380: ......
Страница 381: ...Part III System...
Страница 382: ......
Страница 438: ......
Страница 452: ......
Страница 478: ......
Страница 486: ......
Страница 498: ......
Страница 512: ......
Страница 558: ......
Страница 559: ...Part IV Services...
Страница 560: ......
Страница 652: ......
Страница 670: ......
Страница 742: ......
Страница 754: ......
Страница 796: ......
Страница 817: ...Part V Security...
Страница 818: ......
Страница 858: ......
Страница 886: ......
Страница 910: ......
Страница 911: ...Part VI Troubleshooting...
Страница 912: ......
Страница 924: ......