{
    "mode": "man",
    "parameter": "LDD",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/LDD/json",
    "generated": "2026-10-22T13:25:58Z",
    "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 is the following:\n\n$ ldd /bin/ls\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.   (Before glibc 2.27, the upstream ldd implementation did this for example, al‐\nthough 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": "--verbose",
                    "content": "",
                    "long": "--verbose"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "--unused",
                    "content": "",
                    "long": "--unused"
                },
                {
                    "name": "-u",
                    "content": "",
                    "flag": "-u"
                },
                {
                    "name": "--data-relocs",
                    "content": "",
                    "long": "--data-relocs"
                },
                {
                    "name": "-d",
                    "content": "",
                    "flag": "-d"
                },
                {
                    "name": "--function-relocs",
                    "content": "",
                    "long": "--function-relocs"
                },
                {
                    "name": "-r",
                    "content": "jects or functions (ELF only).\n\n--help Usage information.\n",
                    "flag": "-r"
                }
            ]
        },
        "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\nLinux man-pages 6.7                          2023-10-31                                       ldd(1)",
            "subsections": []
        }
    },
    "summary": "ldd - print shared object dependencies",
    "flags": [
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print the version number of ldd."
        },
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--unused",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-u",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--data-relocs",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--function-relocs",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "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"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Display shared library dependencies of a binary.",
        "examples": [
            {
                "description": "Display shared library dependencies of a binary",
                "command": "ldd {{path/to/binary}}"
            },
            {
                "description": "Display all information about dependencies",
                "command": "ldd {{-v|--verbose}} {{path/to/binary}}"
            },
            {
                "description": "Display unused direct dependencies",
                "command": "ldd {{-u|--unused}} {{path/to/binary}}"
            },
            {
                "description": "Report missing data objects and perform data relocations",
                "command": "ldd {{-d|--data-relocs}} {{path/to/binary}}"
            },
            {
                "description": "Report missing data objects and functions, and perform relocations for both",
                "command": "ldd {{-r|--function-relocs}} {{path/to/binary}}"
            }
        ]
    }
}