- 爱易网页
-
Linux
- 怎么查看linux动态链接库文件的版本等其他信息
日期:2014-05-16 浏览次数:20902 次
如何查看linux动态链接库文件的版本等其他信息
我需要查看一些linux动态链接库的文件的版本信息,不知道有没有什么命令可以。nm和objdump我大概试过,好像没有我要的内容。
不知道是不是我用法有问题,最好还能够知道这个文件的遵循的版权协议。
谢谢!
------解决方案--------------------
不知到下面的方法可不可以:
mymtom@fc6$ objdump -i /lib/libc.so.6
BFD header file version 2.17.50.0.6-5.fc6 20061020
elf64-x86-64
(header little endian, data little endian)
i386
elf32-i386
(header little endian, data little endian)
i386
a.out-i386-linux
(header little endian, data little endian)
i386
efi-app-ia32
(header little endian, data little endian)
i386
elf64-little
(header little endian, data little endian)
i386
elf64-big
(header big endian, data big endian)
i386
elf32-little
(header little endian, data little endian)
i386
elf32-big
(header big endian, data big endian)
i386
srec
(header endianness unknown, data endianness unknown)
i386
symbolsrec
(header endianness unknown, data endianness unknown)
i386
tekhex
(header endianness unknown, data endianness unknown)
i386
binary
(header endianness unknown, data endianness unknown)
i386
ihex
(header endianness unknown, data endianness unknown)
i386
elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32
i386 elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32
elf64-little elf64-big elf32-little elf32-big srec symbolsrec
i386 elf64-little elf64-big elf32-little elf32-big srec symbolsrec
tekhex binary ihex
i386 tekhex binary ihex
mymtom@fc6$ uname -msrv
Linux 2.6.20 #1 SMP Thu Feb 14 18:08:17 CST 2008 x86_64
------解决方案--------------------
这个呢?
mymtom@fc6:src$ objdump -p /lib/libc.so.6
/lib/libc.so.6: file format elf32-i386
Program Header:
PHDR off 0x00000034 vaddr 0x00ae3034 paddr 0x00ae3034 align 2**2
filesz 0x00000140 memsz 0x00000140 flags r-x
INTERP off 0x00124710 vaddr 0x00c07710 paddr 0x00c07710 align 2**0
filesz 0x00000013 memsz 0x00000013 flags r--
LOAD off 0x00000000 vaddr 0x00ae3000 paddr 0x00ae3000 align 2**12
filesz 0x0013936c memsz 0x0013936c flags r-x
LOAD off 0x0013a210 vaddr 0x00c1d210 paddr 0x00c1d210 align 2**12
filesz 0x0000276c memsz 0x00005394 flags rw-
DYNAMIC off 0x0013bd9c vaddr 0x00c1ed9c paddr 0x00c1ed9c align 2**2
filesz 0x000000f8 memsz 0x000000f8 flags rw-
NOTE off 0x00000174 vaddr 0x00ae3174 paddr 0x00ae3174 align 2**2
filesz 0x00000020 memsz 0x00000020 flags r--
TLS off 0x0013a210 vaddr 0x00c1d210 paddr 0x00c1d210 align 2**2
filesz 0x00000008 memsz 0x0000003c flags r--
EH_FRAME off 0x00124724 vaddr 0x00c07724 paddr 0x00c07724 align 2**2
filesz 0x00002a5c memsz 0x00002a5c flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000000 memsz 0x00000000 flags rw-
RELRO off 0x0013a210 vaddr 0x00c1d210 paddr 0x00c1d210 align 2**0
filesz 0x00001df0 memsz 0x00001df0 flags r--
Dynamic Section:
NEEDED ld-linux.so.2
SONAME libc.so.6
INIT 0xaf8c60
FINI_ARRAY 0xc1d218
FINI_ARRAYSZ 0x4
HASH 0xc1909c
GNU_HASH 0xae3194
STRTAB 0xaef744
SYMTAB 0xae6c14
STRSZ 0x55c9
SYMENT 0x10
PLTGOT 0xc1eff4
PLTRELSZ 0x38
PLTREL 0x11
JMPREL 0xaf8b14
REL 0xaf616c
RELSZ 0x29a8