Differences between the static function library and dynamic function library, applications-ldconfig and ldd 1. Differences between the static and dynamic functions library: a. Static function library: Sub-file name. a is to include the entire program, the program will be relatively large, upgrade trouble www.2cto.com B, dynamic function library: Sub file name. so, the link method is flexible, the program is small, the main push 2, the dynamic function library into the memory to improve the speed: first, we must in/etc/ld. so. in the conf file, write 'Directory of the dynamic library to be read into the cache '. Note that it is a directory rather than a file. Then, use the ldconfig file to run/etc/ld. so. conf data is read into the cache, and the data is recorded in/etc/ld. so. cache this file! Example of www.2cto.com: Suppose that the library of my MySQL database is in/usr/lib/mysql, how do I read it into the cache? [Root @ www ~] # Vi/etc/ld. so. confinclude ld. so. conf. d/*. conf/usr/lib/mysql <= This line is added! [Root @ www ~] # Ldconfig <= No information is displayed on the screen. Don't be too nervous! Normal! [Root @ www ~] # Ldconfig-p <= list all the current library information (in/etc/ld. so. cache !) 3. What kind of dynamic library is called by a program and what other libraries related to a dynamic library are: [root @ www ~] # Ldd [-VD] [filename] Option and parameter:-v: list all content information;-d: show the link information that has been lost again! -R: Show ELF-related error content! Example 1: Find the library information for the/usr/bin/passwd file [root @ www ~] # Ldd/usr/bin/passwd .... (Omitted above ).... libaudit. so.0 =>/lib/libaudit. so.0 (0x00494000) <= SELinux libselinux. so.1 =>/lib/libselinux. so.1 (0x00101000) <= SELinux libc. so.6 =>/lib/libc. so.6 (0x00b99000) libpam. so.0 =>/lib/libpam. so.0 (0x004ab000) <= PAM module .... (omitted below ).... # Didn't the preface always mention that passwd uses pam modules! How do you know? # Use ldd to check this file and see libpam. so? This is the form library example 2 provided by pam: Find other form libraries related to the/lib/libc. so.6 function! [Root @ www ~] # Ldd-v/lib/libc. so.6/lib/ld-linux.so.2 (0x00ab3000) linux-gate.so.1 => (0x00636000) Version information: <= use the-v option to add additional Version information! /Lib/libc. so.6: ld-linux.so.2 (GLIBC_PRIVATE) =>/lib/ld-linux.so.2 ld-linux.so.2 (GLIBC_2.3) =>/lib/ld-linux.so.2 ld-linux.so.2 (GLIBC_2.1) =>/lib/ld-linux.so.2