Ldd (Unix)

Last updated

ldd (List Dynamic Dependencies) is a *nix utility that prints the shared libraries required by each program or shared library specified on the command line. [1] It was developed by Roland McGrath and Ulrich Drepper. [2] If some shared library is missing for any program, that program won't come up.

Contents

Security

ldd is a shell script that executes the program given as argument, and shouldn't be used with untrusted binaries. The ldd manual page suggests to use the following command using the objdump and grep utilities as alternative: [3]

user@home ~/ $ objdump -p /path/program | grep NEEDED 

Usage examples

user@home ~/ $ ldd /usr/bin/mp3blaster         linux-vdso.so.1 =>  (0x00007fff8fdff000)        libsidplay.so.1 => /usr/lib/libsidplay.so.1 (0x00007f4ea98ec000)        libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x00007f4ea96e4000)        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007f4ea94b6000)        libncurses.so.5 => /lib/libncurses.so.5 (0x00007f4ea9273000)        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f4ea9056000)        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4ea8d41000)        libm.so.6 => /lib/libm.so.6 (0x00007f4ea8abe000)        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f4ea88a7000)        libc.so.6 => /lib/libc.so.6 (0x00007f4ea8523000)        libogg.so.0 => /usr/lib/libogg.so.0 (0x00007f4ea831c000)        libdl.so.2 => /lib/libdl.so.2 (0x00007f4ea8118000)        /lib64/ld-linux-x86-64.so.2 (0x00007f4ea9b59000)user@home ~/ $ ldd /usr/lib/i386-linux-gnu/libstdc++.so.6.0.20         linux-gate.so.1 (0xb7733000)        libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb75da000)        libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb742f000)        /lib/ld-linux.so.2 (0xb7734000)        libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb7411000)

Related Research Articles

<span class="mw-page-title-main">GNU Debugger</span> Source-level debugger

The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada, C, C++, Objective-C, Free Pascal, Fortran, Go, and partially others.

grep is a command-line utility for searching plain-text data sets for lines that match a regular expression. Its name comes from the ed command g/re/p, which has the same effect. grep was originally developed for the Unix operating system, but later available for all Unix-like systems and some others such as OS-9.

In Unix and Unix-like operating systems, chmod is the command and system call used to change the access permissions and the special mode flags of file system objects. Collectively these were originally called its modes, and the name chmod was chosen as an abbreviation of change mode.

BogoMips is a crude measurement of CPU speed made by the Linux kernel when it boots to calibrate an internal busy-loop. An often-quoted definition of the term is "the number of million times per second a processor can do absolutely nothing".

glibc Standard C Library of the GNU Project

The GNU C Library, commonly known as glibc, is the GNU Project's implementation of the C standard library. Despite its name, it now also directly supports C++. It was started in the 1980s by the Free Software Foundation (FSF) for the GNU operating system.

The C standard library or libc is the standard library for the C programming language, as specified in the ISO C standard. Starting from the original ANSI C standard, it was developed at the same time as the C library POSIX specification, which is a superset of it. Since ANSI C was adopted by the International Organization for Standardization, the C standard library is also called the ISO C library.

time (Unix) Command in Unix and Unix-like operating systems

In computing, time is a command in Unix and Unix-like operating systems. It is used to determine the duration of execution of a particular command.

These tables provide a comparison of operating systems, of computer devices, as listing general and technical information for a number of widely used and currently available PC or handheld operating systems. The article "Usage share of operating systems" provides a broader, and more general, comparison of operating systems that includes servers, mainframes and supercomputers.

<span class="mw-page-title-main">Pipeline (Unix)</span>

In Unix-like computer operating systems, a pipeline is a mechanism for inter-process communication using message passing. A pipeline is a set of processes chained together by their standard streams, so that the output text of each process (stdout) is passed directly as input (stdin) to the next one. The second process is started as the first process is still executing, and they are executed concurrently. The concept of pipelines was championed by Douglas McIlroy at Unix's ancestral home of Bell Labs, during the development of Unix, shaping its toolbox philosophy. It is named by analogy to a physical pipeline. A key feature of these pipelines is their "hiding of internals". This in turn allows for more clarity and simplicity in the system.

file (command) Standard Unix program

The file command is a standard program of Unix and Unix-like operating systems for recognizing the type of data contained in a computer file.

In computing, rpath designates the run-time search path hard-coded in an executable file or library. Dynamic linking loaders use the rpath to find required libraries.

objdump is a command-line program for displaying various information about object files on Unix-like operating systems. For instance, it can be used as a disassembler to view an executable in assembly form. It is part of the GNU Binutils for fine-grained control over executables and other binary data. objdump uses the BFD library to read the contents of object files. Similar utilities are Borland TDUMP, Microsoft DUMPBIN and readelf.

<span class="mw-page-title-main">Linux</span> Family of Unix-like operating systems

Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which includes the kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name "GNU/Linux" to emphasize the importance of GNU software, causing some controversy.

In Unix and Unix-like operating systems, a soname is a field of data in a shared object file. The soname is a string, which is used as a "logical name" describing the functionality of the object. Typically, that name is equal to the filename of the library, or to a prefix thereof, e.g. libc.so.6.

<span class="mw-page-title-main">Vortex86</span> X86-compatible system-on-a-chip

The Vortex86 is a computing system-on-a-chip (SoC) based on a core compatible with the x86 microprocessor family. It is produced by DM&P Electronics, but originated with Rise Technology.

<span class="mw-page-title-main">Unix</span> Family of computer operating systems

Unix is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.

Bionic is an implementation of the standard C library, developed by Google for its Android operating system. It differs from the GNU C Library (glibc) in being designed for devices with less memory and processor power than a typical Linux system. It is a combination of new code and code from FreeBSD, NetBSD, and OpenBSD released under a BSD license, rather than glibc, which uses the GNU Lesser General Public License. This difference was important in the early days of Android, when static linking was common, and is still helpful in introducing Android to software companies used to proprietary operating systems, who can be wary of the LGPL, and unclear about the differences between it and the full GNU General Public License (GPL).

<span class="mw-page-title-main">Chakra (operating system)</span> Linux distribution

Chakra was a Linux distribution originally based on Arch Linux and focused on KDE software, intending to provide a KDE/Qt minimizing use of other widget toolkits where possible. It was well received by critics during its existence.

Mingw-w64 is a free and open source software development environment to create (cross-compile) Microsoft Windows PE applications. It was forked in 2005–2010 from MinGW.

<span class="mw-page-title-main">Ghost (operating system)</span> Operating system

Ghost is an open-source hobbyist operating system and kernel. It has been under development since 2014 and is currently compatible with the x86 platform.

References

  1. "ldd(1) – Linux man page". die.net. Retrieved December 28, 2011.
  2. "ldd Source Code". stuff.mit.edu. Retrieved March 26, 2014.
  3. "ldd(1): print shared library dependencies - Linux man page". linux.die.net. Retrieved 2020-11-18.