当前位置: 技术问答>linux和unix
如何查看linux动态链接库文件的版本等其他信息
来源: 互联网 发布时间:2016-05-13
本文导语: 我需要查看一些linux动态链接库的文件的版本信息,不知道有没有什么命令可以。nm和objdump我大概试过,好像没有我要的内容。 不知道是不是我用法有问题,最好还能够知道这个文件的遵循的版权协议。 谢谢! ...
我需要查看一些linux动态链接库的文件的版本信息,不知道有没有什么命令可以。nm和objdump我大概试过,好像没有我要的内容。
不知道是不是我用法有问题,最好还能够知道这个文件的遵循的版权协议。
谢谢!
不知道是不是我用法有问题,最好还能够知道这个文件的遵循的版权协议。
谢谢!
|
这个呢?
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
RELENT 0x8
VERDEF 0xaf5e74
VERDEFNUM 0x14
FLAGS 0x18
FLAGS_1 0x1
VERNEED 0xaf612c
VERNEEDNUM 0x1
VERSYM 0xaf4d0e
RELCOUNT 0x4d7
CHECKSUM 0x3117392a
0x6ffffdf5 0x46fd5444
Version definitions:
1 0x01 0x0865f4e6 libc.so.6
2 0x00 0x0d696910 GLIBC_2.0
3 0x00 0x0d696911 GLIBC_2.1
GLIBC_2.0
4 0x00 0x09691f71 GLIBC_2.1.1
GLIBC_2.1
5 0x00 0x09691f72 GLIBC_2.1.2
GLIBC_2.1.1
6 0x00 0x09691f73 GLIBC_2.1.3
GLIBC_2.1.2
7 0x00 0x0d696912 GLIBC_2.2
GLIBC_2.1.3
8 0x00 0x09691a71 GLIBC_2.2.1
GLIBC_2.2
9 0x00 0x09691a72 GLIBC_2.2.2
GLIBC_2.2.1
10 0x00 0x09691a73 GLIBC_2.2.3
GLIBC_2.2.2
11 0x00 0x09691a74 GLIBC_2.2.4
GLIBC_2.2.3
12 0x00 0x09691a76 GLIBC_2.2.6
GLIBC_2.2.4
13 0x00 0x0d696913 GLIBC_2.3
GLIBC_2.2.6
14 0x00 0x09691972 GLIBC_2.3.2
GLIBC_2.3
15 0x00 0x09691973 GLIBC_2.3.3
GLIBC_2.3.2
16 0x00 0x09691974 GLIBC_2.3.4
GLIBC_2.3.3
17 0x00 0x0d696914 GLIBC_2.4
GLIBC_2.3.4
18 0x00 0x0d696915 GLIBC_2.5
GLIBC_2.4
19 0x00 0x0963cf85 GLIBC_PRIVATE
GLIBC_2.5
20 0x00 0x0b792650 GCC_3.0
Version References:
required from ld-linux.so.2:
0x0963cf85 0x00 23 GLIBC_PRIVATE
0x0d696913 0x00 22 GLIBC_2.3
0x0d696911 0x00 21 GLIBC_2.1
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
RELENT 0x8
VERDEF 0xaf5e74
VERDEFNUM 0x14
FLAGS 0x18
FLAGS_1 0x1
VERNEED 0xaf612c
VERNEEDNUM 0x1
VERSYM 0xaf4d0e
RELCOUNT 0x4d7
CHECKSUM 0x3117392a
0x6ffffdf5 0x46fd5444
Version definitions:
1 0x01 0x0865f4e6 libc.so.6
2 0x00 0x0d696910 GLIBC_2.0
3 0x00 0x0d696911 GLIBC_2.1
GLIBC_2.0
4 0x00 0x09691f71 GLIBC_2.1.1
GLIBC_2.1
5 0x00 0x09691f72 GLIBC_2.1.2
GLIBC_2.1.1
6 0x00 0x09691f73 GLIBC_2.1.3
GLIBC_2.1.2
7 0x00 0x0d696912 GLIBC_2.2
GLIBC_2.1.3
8 0x00 0x09691a71 GLIBC_2.2.1
GLIBC_2.2
9 0x00 0x09691a72 GLIBC_2.2.2
GLIBC_2.2.1
10 0x00 0x09691a73 GLIBC_2.2.3
GLIBC_2.2.2
11 0x00 0x09691a74 GLIBC_2.2.4
GLIBC_2.2.3
12 0x00 0x09691a76 GLIBC_2.2.6
GLIBC_2.2.4
13 0x00 0x0d696913 GLIBC_2.3
GLIBC_2.2.6
14 0x00 0x09691972 GLIBC_2.3.2
GLIBC_2.3
15 0x00 0x09691973 GLIBC_2.3.3
GLIBC_2.3.2
16 0x00 0x09691974 GLIBC_2.3.4
GLIBC_2.3.3
17 0x00 0x0d696914 GLIBC_2.4
GLIBC_2.3.4
18 0x00 0x0d696915 GLIBC_2.5
GLIBC_2.4
19 0x00 0x0963cf85 GLIBC_PRIVATE
GLIBC_2.5
20 0x00 0x0b792650 GCC_3.0
Version References:
required from ld-linux.so.2:
0x0963cf85 0x00 23 GLIBC_PRIVATE
0x0d696913 0x00 22 GLIBC_2.3
0x0d696911 0x00 21 GLIBC_2.1
|
不知到下面的方法可不可以:
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$ 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