ldd command theory
1, the first ldd not an executable program, but just a shell script
2, ldd will show the executable module dependency, the principle is by setting a series of environmental variables, as follows:
LD_TRACE_LOADED_OBJECTS, LD_WARN, LD_BIND_NOW, LD_LIBRARY_VERSION, LD_VERBOSE so.
When LD_TRACE_LOADED_OBJECTS environment variable is not empty, all executable code at run time, he will only display module dependency, but does not really implement the program. Or you can test in the shell terminal, as follows:
a, export LD_TRACE_LOADED_OBJECTS = 1
b, then the implementation of all programs, such as ls and so on, to see the program running results
3, ldd shows the work of the executable module dependency theory, the essence of this is ld-linux.so (elf dynamic library loader) to achieve. We know, ld-linux.so module will first work on the executable program modules, and access control, so when those mentioned above when the environment variable is set, ld-linux.so chosen display executable module dependency.
4, in fact, a direct implementation of the ld-linux.so modules, such as: / lib/ld-linux.so.2 - list program (which is equivalent to ldd program)
ldd command to use
(From ldd - help)
Name ldd - print shared library dependencies
Outline ldd [option] ... file ...
Description ldd output specified on the command line program or shared library needed for each shared library.
Print the version number of ldd
-V - verbose
Print all information, including, for example symbol version information
-D - data-relocs
Implementation of the symbolic re-deployment, and report missing target object (only ELF format applicable)
-R - function-relocs
Implementation on the target object and function of re-deployment, and report the lack of objective targets and function (ELF format only applicable)
- Help usage information
The standard version of ldd and glibc2 provided with. Libc5 and old versions of previously provided, in some systems there. In libc5 version does not support long options. On the other hand, glibc2 version does not support the-V option, only the equivalent - version option.
If the command line in a given library name contains '/', the libc5 version of this program will use his name as a library; otherwise he will search for libraries in the standard position. Run a current directory of shared libraries, add prefix "./"。
ldd does not work in the a.out format shared library.
ldd can not work in some very old a.out programs, these programs support the ldd issue before the compiler to create. If this type of program you use ldd, program will try to argc = 0 operating mode, and the results unpredictable
Related Posts of [Change] ldd command to use the principles and
Update code after Action (No action responded to xxx) error. Check the code, has been updated. Change the action name, change the path is always error. Baffled. In the system under ps ax | grep mongrel, found that Mongrel can not find the process! Bu ...
I hate the thought of the time to teach some provide a lot of code, because I think the thought process of acceptance should be a pleasure to read as a novel process, rather than spend a lot of brain power for a certain process details And this world ...
Shoes Ruby are cross-platform GUI applications, recently released a new version, it is a very interesting Ruby GUI client, the following are some characteristics of Introduction: 1. Cross-platform support for windows / linux / mac os 2. Very small, t ...
Requirements: server-side has much static files, there is much use of c + + to prepare the operational components necessary to carry out these functions on the external packaging Published Service, server-side state required to preserve the client (simila
<url> http://maven.apache.org </ url> <dependencies> <dependency> <groupId> junit </ groupId> <artifactId> junit </ artifactId> <version> 3.8.1 </ version> <scope> test </ scope> <
What is object-oriented design? Contains what? The benefits of it are what? Required to pay what you do? In today's age, ask these questions seem to be foolish, because this year almost every software developer knows how to use some sort of objec ...
hibernate using myeclipse automatically generated HBM mapping file will be schema ="***" catalog ="***" Separately are the database instance name and database name, but in fact has been stated jdbc url connection database, are the ...
Therefore, in the development of statistical inquiry system, as far as possible through the use of select statement to write the required query property way back relational data, and avoid using the first query return persistent object (in this way are in
Process migration from tomcat to websphere changes Because customers use the web application server software used by different what tomcat5, tomcat6, websphere5.1, websphere6.1, weblogic8, and so on, and the software used inconsistent standards, ibm's
The use of hibernate, implementation of data persistence. Has the following several processes. One configuration database connection information. Hibernate.config 2 configuration mapping. 3 use: the use of the process are the following steps: 3.1: Ge ...