1. 程式人生 > >linux檢視so檔案的一些資訊命令

linux檢視so檔案的一些資訊命令

檢視so檔案是32位還是64位

[[email protected] native]# file libhadoop.so.1.0.0

libhadoop.so.1.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

nm用來列出目標檔案的符號清單.

ar命令可以用來建立、修改庫,也可以從庫中提出單個模組。



objdump:顯示目標檔案中的詳細資訊
objdump -d <command>,可以檢視這些工具究竟如何完成這項任務
ldd  檢視可執行檔案連結了哪些  系統動態連結庫

-d是ldd的縮寫

readelf 顯示關於 ELF 目標檔案的資訊

readelf -d libffmpeg.so | grep NEEDED

 objdump -V libhadoop.so.1.0.0

顯示:

GNU objdump version 2.20.51.0.2-5.36.el6 20100205
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

 ldd libhadoop.so.1.0.0

顯示: linux-vdso.so.1 =>  (0x00007fffbf3d6000)

        libdl.so.2 =>/lib64/libdl.so.2 (0x00007fab46569000)
        libjvm.so => not found
        libc.so.6 => /lib64/libc.so.6 (0x00007fab461d4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fab46990000)