ar Command-Line Options
| Option | Description |
| -c | Suppresses the warning ar would normally emit if the archive doesn't already exist. |
| -q | Adds files to the end of archive without checking for replacements. |
| -r | Inserts files into archive, replacing any existing members whose name matches that being added. New members are added at the end of the archive. |
| -s | Creates or updates the map linking symbols to the member in which they are defined. |
TIP
Given an archive created with the ar command, you can speed up access to the archive
by creating an index to the archive. ranlib does precisely this, storing the index in the
archive file itself. ranlib's syntax is:
ranlib [-v|-V] file
This generates a symbol map in file. It is equivalent to ar -s file.
The ldd Command
While nm lists the symbols defined in an object file, unless you know what library defines which
functions, it is not terribly helpful. That is ldd's job. It lists the shared libraries that a program
requires to run. Its syntax is:
ldd [options] file ldd prints the names of the shared libraries that file requires. Two of
ldd's most useful options are -d , which reports any missing functions, and -r, which reports missing functions and missing
data objects. For example, the following ldd reports that the mail client mutt
(which may or may not be installed on your system) requires eight shared libraries.
$ ldd /usr/bin/mutt
libncursesw.so.5 => /lib/libncursesw.so.5 (0x40021000)
libssl.so.0 => /usr/lib/libssl.so.0 (0x40066000)
libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x40097000)
libc.so.6 => /lib/libc.so.6 (0x40195000)
libgpm.so.1 => /lib/libgpm.so.1 (0x402c5000)
libdl.so.2 => /lib/libdl.so.2 (0x402cb000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libncurses.so.5 => /lib/libncurses.so.5 (0x402ce000)
The output might be different on your system.
The continuation/full version of this article read on site www.podgrid.org - Linux Bible