Archive for January, 2008

Chapter 29 . Programming Tools and Utilities (Business web hosting) 799

Wednesday, January 2nd, 2008

Chapter 29 . Programming Tools and Utilities 799 The output might be different on your system. The ldconfig Command ldconfig determines the runtime links required by shared libraries that are located in /usr/lib and /lib, specified in libs on the command line, and stored in /etc/ ld.so.conf. It works in conjunction with ld.so, the dynamic linker/loader, to create and maintain links to the most current versions of shared libraries available on a system. It has the following syntax: ldconfig [options] [libs] A bare ldconfig simply updates the cache file, /etc/ld.so.cache. options controls ldconfig s behavior. The -v option tells ldconfig to be verbose as it updates the cache. The -p option says to print without updating the current list of shared libraries about which ld.so knows. Environment Variables and Configuration Files The dynamic linker/loader ld.so uses a number of environment variables to customize and control its behavior. These variables include: . $LD_LIBRARY_PATH This variable contains a colon-separated list of directories in which to search for shared libraries at runtime. It is similar to the $PATH environment variable. . $LD_PRELOAD This variable is a whitespace-separated list of additional, user-specified shared libraries to load before all other libraries. It is used selectively to override functions in other shared libraries. ld.so also uses two configuration files whose purposes parallel those environment variables: . /etc/ld.so.conf Contains a list of directories that the linker/loader should search for shared libraries in addition to the standard directories, /usr/lib and /lib. . /etc/ld.so.preload Contains a disk-based version of the $LD_PRELOAD environment variable, including a whitespace-separated list of shared libraries to be loaded prior to executing a program. You can use $LD_PRELOAD to override installed versions of a library with a specific version; this is often useful when you are testing a new (or different) library version but don t want to install the replacement library on your system.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

798 Part (Web hosting support) VI . Programming in Linux Table

Tuesday, January 1st, 2008

798 Part VI . Programming in Linux Table 29-4 ar Command-Line Options Option Description -c Suppresses the warning ar would normally emit if the archive doesn t already exist. -q Adds files to the end of archive without checking for replacements. -r Inserts files into archive, replacing any existing members whose name matches that being added. New members are added at the end of the archive. -s Creates or updates the map linking symbols to the member in which they are defined. Given an archive created with the ar command, you can speed up access to the archive by creating an index to the archive. ranlib does precisely this, storing the index in the archive file itself. ranlib s syntax is: ranlib [-v|-V] file This generates a symbol map in file. It is equivalent to ar -s file. The ldd Command While nm lists the symbols defined in an object file, unless you know what library defines which functions, it is not terribly helpful. That is ldd s job. It lists the shared libraries that a program requires to run. Its syntax is: ldd [options] file ldd prints the names of the shared libraries file requires. Two of ldd s most useful options are -d, which reports any missing functions, and -r, which reports missing functions and missing data objects. For example, the following ldd reports that the mail client mutt (which may or may not be installed on your system) requires eight shared libraries. $ ldd /usr/bin/mutt libncursesw.so.5 => /lib/libncursesw.so.5 (0×40021000) libssl.so.0 => /usr/lib/libssl.so.0 (0×40066000) libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0×40097000) libc.so.6 => /lib/libc.so.6 (0×40195000) libgpm.so.1 => /lib/libgpm.so.1 (0×402c5000) libdl.so.2 => /lib/libdl.so.2 (0×402cb000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0×40000000) libncurses.so.5 => /lib/libncurses.so.5 (0×402ce000) Tip
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.