readelf -dl 查看运行时依赖

5903阅读 0评论2012-01-13 pppStar
分类:LINUX

whereis libQtWebKitE.so.4
libQtWebKitE.so: /usr/lib/libQtWebKitE.so.4

arm-none-linux-gnueabi-readelf .//usr/bin/matrix_guiE -dl

Elf file type is EXEC (Executable file)
Entry point 0xd2d4
There are 8 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  EXIDX          0x00e618 0x00016618 0x00016618 0x00328 0x00328 R   0x4
  PHDR           0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
  INTERP         0x000134 0x00008134 0x00008134 0x00013 0x00013 R   0x1
      [Requesting program interpreter: /lib/ld-linux.so.3]
  LOAD           0x000000 0x00008000 0x00008000 0x0e944 0x0e944 R E 0x8000
  LOAD           0x00e944 0x0001e944 0x0001e944 0x0049c 0x005a0 RW  0x8000
  DYNAMIC        0x00e950 0x0001e950 0x0001e950 0x00150 0x00150 RW  0x4
  NOTE           0x000148 0x00008148 0x00008148 0x00020 0x00020 R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

 Section to Segment mapping:
  Segment Sections...
   00     .ARM.exidx 
   01     
   02     .interp 
   03     .interp .note.ABI-tag .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.extab .ARM.exidx .eh_frame 
   04     .init_array .fini_array .jcr .dynamic .got .data .bss 
   05     .dynamic 
   06     .note.ABI-tag 
   07     

Dynamic section at offset 0xe950 contains 37 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libpng12.so.0]
 0x00000001 (NEEDED)                     Shared library: [libfreetype.so.6]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgthread-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libQtWebKitE.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtGuiE.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtNetworkE.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtCoreE.so.4]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x00000001 (NEEDED)                     Shared library: [libQtDBusE.so.4]
 0x0000000c (INIT)                       0xc948
 0x0000000d (FINI)                       0x147d8
 0x00000019 (INIT_ARRAY)                 0x1e944
 0x0000001b (INIT_ARRAYSZ)               4 (bytes)
 0x0000001a (FINI_ARRAY)                 0x1e948
 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
 0x6ffffef5 (GNU_HASH)                   0x8168
 0x00000005 (STRTAB)                     0x9c80
 0x00000006 (SYMTAB)                     0x8d60
 0x0000000a (STRSZ)                      9099 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x1eaa0
 0x00000002 (PLTRELSZ)                   1608 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0xc300
 0x00000011 (REL)                        0xc280
 0x00000012 (RELSZ)                      128 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffe (VERNEED)                    0xc1f0
 0x6fffffff (VERNEEDNUM)                 4
 0x6ffffff0 (VERSYM)                     0xc00c
 0x00000000 (NULL)                       0x0

还有一个ldd 也有类似功能
上一篇:moin-1.9.3 + apache wsgi +python2.6x 制作wiki小站
下一篇:void *x264_malloc( int i_size )解析