GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LIBCHK(1) FreeBSD General Commands Manual LIBCHK(1)

libchk
checks shared library links of binaries

libchk [-hsv] [-x directory] [directory ...]

libchk is a tool to help users obtain the following information:
  • A list of executables that have unresolvable shared library links
  • A list of shared libraries that are not referenced by any binary
  • A list of binaries for each shared library that are linked with the library

Directories that libchk searches for executables and libraries include:

/bin
/sbin
/usr/bin
/usr/games
/usr/libexec
/usr/sbin
$LOCALBASE/bin
$LOCALBASE/libexec
$LOCALBASE/sbin
$X11BASE/bin
$X11BASE/libexec
$X11BASE/sbin

And the directories listed in PATH and the library search path that ldconfig(8) tells. In addition, a user can specify additional directories to search via the command line.

e.g.:

$ libchk /home/*/bin

The directory list is automatically optimized to avoid duplicated search.

libchk recursively looks into those directories and checks shared library links for each binary. If a dead library link is found, it is immediately reported.

When it is done though all directories, libchk lists the shared libraries in the library search path that are not referenced by (linked with) any binary.

Do not blindly delete libraries that libchk reports as unreferenced, because there are many reasons that libchk cannot perfectly detect if a shared library is referenced by:
  • A library may be referenced by an executable hidden under a user directory or an application specific directory.
  • A library may be put there for future use.
  • A library on an NFS exported or NFS mounted file system may be referenced by an executable on another host.
  • A library can be dynamically linked with by calling dlopen(3), which libchk can never detect.

The following command line arguments are supported:

 
By default, libchk does not regard a reference to a library in the same directory as dead, but this option makes libchk warn of that as well.

 
Make a detailed report. libchk will also check and report what executables and libraries each library is referenced (used) by.

directory
 
directory
Exclude the specified directory from the list of directories that libchk searches for executables and libraries.
directory ...
Additional directories to search for binaries.

The command search path.
The local base directory. (default: /usr/local)
The X11 base directory. (default: /usr/X11R6)

ldconfig(8)

  • Currently, libchk only checks FreeBSD ELF executables and libraries.

Akinori MUSHA ⟨knu@iDaemons.org⟩
September 2, 2002 FreeBSD

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.