ldd

List the shared objects that a program requires (Unix)

Syntax:

ldd program ...

Runs on:

Neutrino

Options:

None.

Description:

The ldd (“list dynamic dependencies”) command lists the shared objects that the specified programs require. If you don't specify the full path for a program, ldd looks for it in your current directory.

You can use this utility to determine which shared objects to include in an OS image; see the Sample Buildfiles appendix in Building Embedded Systems.


Note: It's worth noting that ldd is also the name of the runtime linker. In the .interp section, it's called ldqnx.so, and it's in libc, which is why you need to create a symbolic link like this:
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

in your mkifs buildfiles.


Examples:

# ldd `which ksh`
/bin/ksh:
        libc.so.3 => /usr/lib/ldqnx.so.2 (0xb0300000)
# ldd `which appbuilder`
/usr/qnx640/host/qnx6/x86/usr/photon/appbuilder/appbuilder:
        libph.so.3 => /usr/lib/libph.so.3 (0xb8200000)
        libphexlib.so.3 => /usr/lib/libphexlib.so.3 (0xb8311000)
        libfont.so.1 => /lib/libfont.so.1 (0xb8340000)
        libimg.so.1 => /lib/libimg.so.1 (0xb8348000)
        libc.so.3 => /usr/lib/ldqnx.so.2 (0xb0300000)

Environment variables:

DL_DEBUG
If this environment variable is set, the shared library loader displays debugging information about the libraries as they're opened.

See also:

objdump

dlopen() in the QNX Neutrino Library Reference