{
    "mode": "man",
    "parameter": "ldd",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ldd/1/json",
    "generated": "2026-05-30T05:10:00Z",
    "synopsis": "ldd [option]... file...",
    "sections": {
        "NAME": {
            "content": "ldd - print shared object dependencies\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ldd [option]... file...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ldd  prints  the  shared objects (shared libraries) required by each program or shared object\nspecified on the command line.  An example of its use and output (using sed(1) to trim  lead‐\ning white space for readability in this page) is the following:\n\n$ ldd /bin/ls | sed 's/^ */    /'\nlinux-vdso.so.1 (0x00007ffcc3563000)\nlibselinux.so.1 => /lib64/libselinux.so.1 (0x00007f87e5459000)\nlibcap.so.2 => /lib64/libcap.so.2 (0x00007f87e5254000)\nlibc.so.6 => /lib64/libc.so.6 (0x00007f87e4e92000)\nlibpcre.so.1 => /lib64/libpcre.so.1 (0x00007f87e4c22000)\nlibdl.so.2 => /lib64/libdl.so.2 (0x00007f87e4a1e000)\n/lib64/ld-linux-x86-64.so.2 (0x00005574bf12e000)\nlibattr.so.1 => /lib64/libattr.so.1 (0x00007f87e4817000)\nlibpthread.so.0 => /lib64/libpthread.so.0 (0x00007f87e45fa000)\n\nIn  the  usual  case,  ldd  invokes  the  standard  dynamic  linker  (see  ld.so(8)) with the\nLDTRACELOADEDOBJECTS environment variable set to 1.  This causes the dynamic linker to in‐\nspect  the  program's  dynamic  dependencies,  and  find (according to the rules described in\nld.so(8)) and load the objects that satisfy those dependencies.   For  each  dependency,  ldd\ndisplays  the  location  of  the matching object and the (hexadecimal) address at which it is\nloaded.  (The linux-vdso and ld-linux  shared  dependencies  are  special;  see  vdso(7)  and\nld.so(8).)\n",
            "subsections": [
                {
                    "name": "Security",
                    "content": "Be  aware  that  in  some circumstances (e.g., where the program specifies an ELF interpreter\nother than ld-linux.so), some versions of ldd may attempt to obtain the  dependency  informa‐\ntion  by attempting to directly execute the program, which may lead to the execution of what‐\never code is defined in the program's ELF interpreter, and perhaps to execution of  the  pro‐\ngram  itself.   (In  glibc versions before 2.27, the upstream ldd implementation did this for\nexample, although most distributions provided a modified version that did not.)\n\nThus, you should never employ ldd on an untrusted executable, since this may  result  in  the\nexecution of arbitrary code.  A safer alternative when dealing with untrusted executables is:\n\n$ objdump -p /path/to/program | grep NEEDED\n\nNote,  however,  that  this alternative shows only the direct dependencies of the executable,\nwhile ldd shows the entire dependency tree of the executable.\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--version",
                    "content": "Print the version number of ldd.\n",
                    "long": "--version"
                },
                {
                    "name": "-v --verbose",
                    "content": "Print all information, including, for example, symbol versioning information.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-u --unused",
                    "content": "Print unused direct dependencies.  (Since glibc 2.3.4.)\n",
                    "flag": "-u",
                    "long": "--unused"
                },
                {
                    "name": "-d --data-relocs",
                    "content": "Perform relocations and report any missing objects (ELF only).\n",
                    "flag": "-d",
                    "long": "--data-relocs"
                },
                {
                    "name": "-r --function-relocs",
                    "content": "Perform relocations for both data objects and functions, and report  any  missing  ob‐\njects or functions (ELF only).\n\n--help Usage information.\n",
                    "flag": "-r",
                    "long": "--function-relocs"
                }
            ]
        },
        "BUGS": {
            "content": "ldd does not work on a.out shared libraries.\n\nldd  does not work with some extremely old a.out programs which were built before ldd support\nwas added to the compiler releases.  If you use ldd on one of  these  programs,  the  program\nwill attempt to run with argc = 0 and the results will be unpredictable.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pldd(1), sprof(1), ld.so(8), ldconfig(8)\n",
            "subsections": []
        },
        "COLOPHON": {
            "content": "This  page  is  part  of  release  5.10 of the Linux man-pages project.  A description of the\nproject, information about reporting bugs, and the latest version of this page, can be  found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\n2019-03-06                                       LDD(1)",
            "subsections": []
        }
    },
    "summary": "ldd - print shared object dependencies",
    "flags": [
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print the version number of ldd."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Print all information, including, for example, symbol versioning information."
        },
        {
            "flag": "-u",
            "long": "--unused",
            "arg": null,
            "description": "Print unused direct dependencies. (Since glibc 2.3.4.)"
        },
        {
            "flag": "-d",
            "long": "--data-relocs",
            "arg": null,
            "description": "Perform relocations and report any missing objects (ELF only)."
        },
        {
            "flag": "-r",
            "long": "--function-relocs",
            "arg": null,
            "description": "Perform relocations for both data objects and functions, and report any missing ob‐ jects or functions (ELF only). --help Usage information."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pldd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pldd/1/json"
        },
        {
            "name": "sprof",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sprof/1/json"
        },
        {
            "name": "ld.so",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ld.so/8/json"
        },
        {
            "name": "ldconfig",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ldconfig/8/json"
        }
    ]
}