0

As my understanding, so file is the dynamic library. We can use ldd to print its dependencies.

For example, I can execute ldd -r /usr/lib/aarch64-linux-gnu/libstdc++.so.6 to get the output as below:

    linux-vdso.so.1 =>  (0x0000ffff793f7000)
    libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff79173000)
    libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff7902c000)
    /lib/ld-linux-aarch64.so.1 (0x0000aaaae0a5d000)
    libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff7900b000)

However, today when I execute ldd -r /lib/ld-linux-aarch64.so.1, I get this:

statically linked

Why does I get such an output? What does this mean?

0

The file is not using dynamic libraries, but rather has the needed parts of the libraries inside the executable.

As a result, ldd cannot tell you anything about the file.

This means that the executable does not need dynamic libraries, but this also means that it cannot benefit from bug fixes in the libraries and if a kernel interface is changed, the static executable will fail to work with the changed new kernel.

In your special case, you are checking the so called run time linker that is used to link the dynamic libraries at runtime to the main binary by mmap()ing them and by creating the right offsets for calls into the dynamic libraries. Since this runtime linker is doing the work, it cannot depend on other dynamic objects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.