Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ldconfig(8) [netbsd man page]

LDCONFIG(8)						    BSD System Manager's Manual 					       LDCONFIG(8)

ldconfig -- configure the a.out shared library cache SYNOPSIS
ldconfig [-cmrsSv] [directory ...] DESCRIPTION
ldconfig is used to prepare a set of ``hints'' for use by the a.out run-time linker to facilitate quick lookup of shared libraries available in multiple directories. ldconfig is only available on systems that use the ``a.out'' format for executables and libraries - on ELF systems, all the work is done by ld.elf_so. By default, it scans a set of built-in system directories, directories listed in /etc/, and any directories specified on the com- mand line (in the given order) looking for shared libraries and stores the results in the file /var/run/ to forestall the overhead that would otherwise result from the directory search operations would have to perform to load required shared libraries. The shared libraries so found will be automatically available for loading if needed by the program being prepared for execution. This obvi- ates the need for storing search paths within the executable. The LD_LIBRARY_PATH environment variable can be used to override the use of directories (or the order thereof) from the cache or to specify additional directories where shared libraries might be found. LD_LIBRARY_PATH is a ':' separated list of directory paths that are searched by when it needs to load a shared library. It can be viewed as the run-time equivalent of the -L switch of ld. ldconfig is typically run as part of the boot sequence. The following options are recognized by ldconfig: -c Do not scan directories listed in /etc/ for shared libraries. -m Merge the result of the scan of the directories given as arguments into the existing hints file. The default action is to build the hints file afresh. -r Lists the current contents of on the standard output. The hints file will not be modified. -s Do not scan the built-in system directory (/usr/lib), nor any directories listed in /etc/ for shared libraries. -S Do not scan the built-in system directory (/usr/lib), for shared libraries. (Directories listed in /etc/ are still scanned.) -v Switch on verbose mode. FILES
/var/run/, /etc/ SEE ALSO
ld(1),,, link(5) HISTORY
A ldconfig utility first appeared in SunOS 4.0, it appeared in its current form in NetBSD 0.9A. SECURITY CONSIDERATIONS
Special care must be taken when loading shared libraries into the address space of set-user-ID programs. Whenever such a program is run, will only load shared libraries from the file. In particular, the LD_LIBRARY_PATH and LD_PRELOAD is not used to search for libraries. Thus, the role of ldconfig is dual. In addition to building a set of hints for quick lookup, it also serves to specify the trusted collection of directories from which shared objects can be safely loaded. It is presumed that the set of directories specified to ldconfig is under control of the system's administrator. further assists set-user-ID programs by erasing the LD_LIBRARY_PATH and LD_PRELOAD from the environment. BSD
October 8, 2000 BSD

Check Out this Related Man Page

LDCONFIG(8)						     Linux Programmer's Manual						       LDCONFIG(8)

/sbin/ldconfig - configure dynamic linker run-time bindings SYNOPSIS
/sbin/ldconfig [ -nNvXV ] [ -f conf ] [ -C cache ] [ -r root ] directory ... /sbin/ldconfig -l [ -v ] library ... /sbin/ldconfig -p DESCRIPTION
ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/, and in the trusted directories (/lib and /usr/lib). The cache is used by the run-time linker, or ld- ldconfig checks the header and filenames of the libraries it encounters when determining which versions should have their links updated. ldconfig will attempt to deduce the type of ELF libs (i.e., libc5 or libc6/glibc) based on what C libs, if any, the library was linked against. Some existing libs do not contain enough information to allow the deduction of their type. Therefore, the /etc/ file format allows the specification of an expected type. This is only used for those ELF libs which we can not work out. The format is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6. (This syntax also works on the command line.) Spaces are not allowed. Also see the -p option. ldconfig should normally be run by the superuser as it may require write permission on some root owned directories and files. OPTIONS
-v Verbose mode. Print current version number, the name of each directory as it is scanned, and any links that are created. Overrides quiet mode. -n Only process directories specified on the command line. Don't process the trusted directories (/lib and /usr/lib) nor those speci- fied in /etc/ Implies -N. -N Don't rebuild the cache. Unless -X is also specified, links are still updated. -X Don't update links. Unless -N is also specified, the cache is still rebuilt. -f conf Use conf instead of /etc/ -C cache Use cache instead of /etc/ -r root Change to and use root as the root directory. -l Library mode. Manually link individual libraries. Intended for use by experts only. -p Print the lists of directories and candidate libraries stored in the current cache. FILES
/lib/ run-time linker/loader /etc/ File containing a list of colon, space, tab, newline, or comma-separated directories in which to search for libraries. /etc/ File containing an ordered list of libraries found in the directories specified in /etc/, as well as those found in /lib and /usr/lib. SEE ALSO
ldd(1), COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at GNU
2009-04-15 LDCONFIG(8)
Man Page