next up previous
Next: Analyzing dependencies Up: No Title Previous: Related work

Dynamic libraries and global analysis

The cause of our problems is that in a modern UNIX environment, the file containing an executable program is seldom the only component required in order to execute the program. Each executable binary file contains references to one or more dynamic libraries that are linked into the program after it is invoked and before it begins execution (through the dynamic linker ld.so). The typical reason for this way of segmenting programs is to share runtime memory; one in-memory copy of a library may be shared among several executables running at the same time. But if the libraries needed at runtime by a specific program are changed or deleted, the referring program may change in behavior or fail to run at all.

While it is possible (through the command ldd) to examine which libraries are loaded by any specific program, no general mechanism except sowhat exists for examining which programs load a specific library. This is because while the former question involves examining one executable, the latter involves examining all possible executables that could load the library. The former question is local in scope, while the latter is global. In practice, this means that without a tool such as sowhat, one can never safely delete any library in the system without the risk of breaking an unknown program. If user uptime is more important than disk space, this means one can never delete or upgrade any library at all because the impact of such a change is unknown. One can only add libraries. This leads to `library rot' much like `filesystem rot'[3], in which libraries gradually fill up with useless files that one cannot delete with any assurance of lack of impact.


next up previous
Next: Analyzing dependencies Up: No Title Previous: Related work
Alva L. Couch
2001-11-05