ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ldd工具的使用

ldd工具的使用

原创 Linux操作系统 作者:Dodd 时间:2008-02-28 17:14:06 0 删除 编辑

ldd工具是一个在linuxunix操作系统里用来显示一个执行文件或共享库的动态依赖信息的。

 

ldd工具在解决类似error while loading shared libraries: libclntsh.so.9.0等错误是很好用。

 

下面是这个工具的用法:

 

[oracle@filesvr1 oracle]$ man ldd

LDD(1)                                                                  LDD(1)

 

NAME

       ldd - print shared library dependencies

 

SYNOPSIS

       ldd [OPTION]...  FILE...

 

DESCRIPTION

       ldd  prints  the  shared  libraries  required by each program or shared

       library specified on the command line.

 

OPTIONS

       --version

              Print the version number of ldd.

 

       -v --verbose

              Print all information, including e.g. symbol versioning informa-

              tion.

 

       -d --data-relocs

              Perform. relocations and report any missing objects (ELF only).

 

       -r --function-relocs

              Perform  relocations  for  both  data objects and functions, and

              report any missing objects or functions (ELF only).

 

       --help Usage information.

 

BUGS

       ldd does not work on a.out shared libraries.

 

       ldd does not work with some extremely old  a.out  programs  which  were

       built  before  ldd  support was added to the compiler releases.  If you

       use ldd on one of these programs, the program will attempt to run  with

       argc = 0 and the results will be unpredictable.

 

AUTHOR

       Roland McGrath and Ulrich Drepper.

 

SEE ALSO

       ldconfig(8), ld.so(8).

 

                                30 October 2000                         LDD(1)

 

[oracle@filesvr1 oracle]$ ldd /opt/oracle/product/9.2.0/bin/sqlplus

        libclntsh.so.9.0 => /opt/oracle/product/9.2.0/lib/libclntsh.so.9.0 (0xb6c19000)

        libwtc9.so => /opt/oracle/product/9.2.0/lib/libwtc9.so (0xb6c16000)

        libdl.so.2 => /lib/libdl.so.2 (0xb6c13000)

        libm.so.6 => /lib/tls/libm.so.6 (0xb6bf1000)

        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb6be0000)

        libnsl.so.1 => /lib/libnsl.so.1 (0xb6bcb000)

        libc.so.6 => /lib/tls/libc.so.6 (0xb6a93000)

        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)

 

-v选项  包括版本信息

       -v --verbose

              Print all information, including e.g. symbol versioning informa-

              tion.

 

 

[oracle@filesvr1 oracle]$ ldd -v /opt/oracle/product/9.2.0/bin/sqlplus

        libclntsh.so.9.0 => /opt/oracle/product/9.2.0/lib/libclntsh.so.9.0 (0xb6c19000)

        libwtc9.so => /opt/oracle/product/9.2.0/lib/libwtc9.so (0xb6c16000)

        libdl.so.2 => /lib/libdl.so.2 (0xb6c13000)

        libm.so.6 => /lib/tls/libm.so.6 (0xb6bf1000)

        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb6be0000)

        libnsl.so.1 => /lib/libnsl.so.1 (0xb6bcb000)

        libc.so.6 => /lib/tls/libc.so.6 (0xb6a93000)

        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)

 

        Version information:

        /opt/oracle/product/9.2.0/bin/sqlplus:

                libpthread.so.0 (GLIBC_2.0) => /lib/tls/libpthread.so.0

                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6

        /opt/oracle/product/9.2.0/lib/libclntsh.so.9.0:

                libdl.so.2 (GLIBC_2.1) => /lib/libdl.so.2

                libdl.so.2 (GLIBC_2.0) => /lib/libdl.so.2

                libm.so.6 (GLIBC_2.1) => /lib/tls/libm.so.6

                libm.so.6 (GLIBC_2.0) => /lib/tls/libm.so.6

                libpthread.so.0 (GLIBC_2.2) => /lib/tls/libpthread.so.0

                libpthread.so.0 (GLIBC_2.0) => /lib/tls/libpthread.so.0

                libpthread.so.0 (GLIBC_2.1) => /lib/tls/libpthread.so.0

                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.2) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.1.2) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6

        /opt/oracle/product/9.2.0/lib/libwtc9.so:

                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6

        /lib/libdl.so.2:

                libc.so.6 (GLIBC_2.3) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_PRIVATE) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6

                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2

        /lib/tls/libm.so.6:

                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2

                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6

        /lib/tls/libpthread.so.0:

                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2

                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.3.2) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.2) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_PRIVATE) => /lib/tls/libc.so.6

        /lib/libnsl.so.1:

                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.2) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.2.3) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6

                libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6

        /lib/tls/libc.so.6:

                ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2

                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

                ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2

                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2

 

 

--The End--

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7220098/viewspace-196159/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-22

  • 博文量
    46
  • 访问量
    159057