Ldd in linux

Source: Internet
Author: User
Linux ldd-Linux general technology-Linux programming and kernel information. The following is a detailed description. 1. ldd is not an executable program, but a shell script.

2. ldd can display the dependency of the executable module. The principle is to set a series of environment variables, such as LD_TRACE_LOADED_OBJECTS, LD_WARN, LD_BIND_NOW, LD_LIBRARY_VERSION, and LD_VERBOSE. When the LD_TRACE_LOADED_OBJECTS environment variable is not empty, when any executable program is running, it only displays the dependency of the module, and the program is not actually executed. Or you can test it on the shell terminal as follows:

(1) export LD_TRACE_LOADED_OBJECTS = 1

(2) execute any program, such as ls, and check the running result of the program.

3. ldd shows the dependency working principle of the executable module. Its essence is realized by ld-linux.so (loader of elf dynamic library. We know that the ld-linux.so module will work prior to the executable module program and gain control, so when those environment variables above are set, the ld-linux.so selects the dependency that shows the executable module.

4, in fact can directly execute the ld-linux.so module, such as:/lib/ld-linux.so.2 -- list program (which is equivalent to ldd program)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.