next up previous contents
Next: ldconfig 函式庫工具 Up: Makefile 函式庫 Previous: 函式庫   Contents   DYWANG_HOME

ldd 函式庫工具

  1. Linux 放置函式庫之目錄:
    [dywang@dyw219 make1]$ ll -d /lib{,64} /usr/lib{,64}
    dr-xr-xr-x.  12 root root  4096 Nov 29 18:10 /lib
    dr-xr-xr-x.  10 root root 12288 Sep 29  2018 /lib64
    dr-xr-xr-x.  33 root root  4096 Nov 29 18:10 /usr/lib
    dr-xr-xr-x. 146 root root 77824 Feb 14 03:33 /usr/lib64
  2. ldd 輔助說明
    [dywang@dyw219 make1]$ ldd --help
    Usage: ldd [OPTION]... FILE...
          --help              print this help and exit
          --version           print version information and exit
      -d, --data-relocs       process data relocations
      -r, --function-relocs   process data and function relocations
      -u, --unused            print unused direct dependencies
      -v, --verbose           print all information
    For bug reporting instructions, please see:
  3. 找出執行檔 main 使用的那些動態函式庫?
    [dywang@dyw219 make1]$ ldd main =>  (0x00007ffe741f9000) => /lib64/ (0x000000394aa00000)
    	/lib64/ (0x000055836ce6b000)
  4. 再找出函式 /lib64/ 的相關其他函式庫。
    [dywang@dyw219 make1]$ ldd /lib64/ 
    	/lib64/ (0x0000558d8c22f000) =>  (0x00007ffd3d158000)

De-Yu Wang 2020-06-19