目次
概述
功能:用于显示ELF文件(如.so、.a、.o文件等)的相关信息。
readelf下令可显示一个或多个ELF格式对象文件的信息。背面可加一些选项控制要显示的特定信息。
elffile …是要检查的目的文件。支持32位和64位ELF文件,也支持包罗ELF文件的文档(如使用ar下令将一些elf文件打包生成的lib*.a之类的文件)。
该程序执行与objdump相似的功能,但更详细,而且独立于BFD库而存在,因此,纵然BFD中存在错误,readelf也不会受到影响。
- Usage: readelf elf-file(s) Display information about the contents of ELF format files Options are: -a --all Equivalent to: -h -l -S -s -r -d -V -A -I -h --file-header Display the ELF file header -l --program-headers Display the program headers --segments An alias for --program-headers -S --section-headers Display the sections' header --sections An alias for --section-headers -g --section-groups Display the section groups -t --section-details Display the section details -e --headers Equivalent to: -h -l -S -s --syms Display the symbol table --symbols An alias for --syms --dyn-syms Display the dynamic symbol table -n --notes Display the core notes (if present) -r --relocs Display the relocations (if present) -u --unwind Display the unwind info (if present) -d --dynamic Display the dynamic section (if present) -V --version-info Display the version sections (if present) -A --arch-specific Display architecture specific information (if any) -c --archive-index Display the symbol/file index in an archive -D --use-dynamic Use the dynamic section info when displaying symbols -x --hex-dump= Dump the contents of section as bytes -p --string-dump= Dump the contents of section as strings -R --relocated-dump= Dump the contents of section as relocated bytes -z --decompress Decompress section before dumping it -w[lLiaprmfFsoRtUuTgAckK] or --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames, =frames-interp,=str,=loc,=Ranges,=pubtypes, =gdb_index,=trace_info,=trace_abbrev,=trace_aranges, =addr,=cu_index,=links,=follow-links] Display the contents of DWARF debug sections --dwarf-depth=N Do not display DIEs at depth N or greater --dwarf-start=N Display DIEs starting with N, at the same depth or deeper -I --histogram Display histogram of bucket list lengths -W --wide Allow output width to exceed 80 characters @ Read options from -H --help Display this information -v --version Display the version number of readelfReport bugs to
复制代码 简述
详见:https://sourceware.org/binutils/docs/binutils/readelf.html
- -a --all 显示全部信息,等价于 -h -l -S -s -r -d -V -A -I-h --file-header 显示ELF文件开始的文件头信息-l --program-headers--segments 显示程序头(段头)信息-S --section-headers--sections 显示节头信息-g --section-groups 显示节组信息-t --section-details 显示节的详细信息-e --headers 显示全部头信息,等价于: -h -l -S-s --syms --symbols 显示符号表节的信息,包罗静态符号表(.symtab)和动态符号表(.dynsym) 如果只关心动态符号表可以直接使用--dyn-syms 如果符号有相应的版本信息,则会显示该版本信息 版本字符串显示为符号名称的后缀,并以@字符开头,比方foo@VER_1。 在剖析未版本化引用的符号时,如果该版本是要使用的默认版本,则将显示为后缀,厥后跟两个@字符,比方foo@@VER_2-n --notes 显示note段/节的信息-r --relocs 显示可重定位节的信息-u --unwind 显示unwind节信息-d --dynamic 显示动态节的信息-V --version-info 显示版本段的信息 -A --arch-specific 显示特定结构体系信息-c --archive-index 显示二进制文档的标头部门中包罗的文件符号索引信息 -D --use-dynamic 显示符号时,使用动态节中的符号哈希表,而不是符号表节。显示重定位时,使显示动态重定位而不是静态重定位-x --hex-dump= 显示指定节的内容为十六进制字节-p --string-dump= 显示指定节的内容为可打印的字符串-R --relocated-dump= 显示指定节的内容为十六进制字节,并在显示之前重新定位 -z --decompress 要求被x,R或p选项存储的节在显示之前先解压缩。如果未压缩,则将按原样显示-w[lLiaprmfFsOoRtUuTgAckK]--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links] 显示文件中DWARF调试节的内容 -I --histogram 显示符号表时,显示bucket list长度的柱状图-W --wide 允许输出宽度凌驾80个字符显示在一行上-H --help 显示readelf可明确的下令行选项-v --version 显示readelf的版本信息@file 从中获取下令行选项
复制代码 演示
- readelf.exe -h libcdsprpc.soELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: DYN (Shared object file) Machine: AArch64 Version: 0x1 Entry point address: 0x7b0 Start of program headers: 64 (bytes into file) Start of section headers: 20488 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 5 Size of section headers: 64 (bytes) Number of section headers: 24 Section header string table index: 21
复制代码- readelf.exe -l libcdsprpc.soElf file type is DYN (Shared object file)Entry point 0x7b0There are 5 program headers, starting at offset 64Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000001090 0x0000000000001090 R E 0x10000 LOAD 0x0000000000001ea0 0x0000000000011ea0 0x0000000000011ea0 0x0000000000000168 0x0000000000000168 RW 0x10000 DYNAMIC 0x0000000000001ea0 0x0000000000011ea0 0x0000000000011ea0 0x0000000000000140 0x0000000000000140 RW 0x8 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 0x10 GNU_RELRO 0x0000000000001ea0 0x0000000000011ea0 0x0000000000011ea0 0x0000000000000160 0x0000000000000160 R 0x1 Section to Segment mapping: Segment Sections... 00 .hash .dynsym .dynstr .rela.plt .plt .text .rodata 01 .dynamic .got .got.plt 02 .dynamic 03 04 .dynamic .got
复制代码- readelf.exe -S libcdsprpc.soThere are 24 section headers, starting at offset 0x5008:Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .hash HASH 0000000000000158 00000158 00000000000000c4 0000000000000004 A 2 0 8 [ 2] .dynsym DYNSYM 0000000000000220 00000220 00000000000002d0 0000000000000018 A 3 2 8 [ 3] .dynstr STRTAB 00000000000004f0 000004f0 000000000000026a 0000000000000000 A 0 0 1 [ 4] .rela.plt RELA 0000000000000760 00000760 0000000000000018 0000000000000018 AI 2 10 8 [ 5] .plt PROGBITS 0000000000000780 00000780 0000000000000030 0000000000000010 AX 0 0 16 [ 6] .text PROGBITS 00000000000007b0 000007b0 00000000000003f8 0000000000000000 AX 0 0 4 [ 7] .rodata PROGBITS 0000000000000ba8 00000ba8 00000000000004e8 0000000000000001 AMS 0 0 1 [ 8] .dynamic DYNAMIC 0000000000011ea0 00001ea0 0000000000000140 0000000000000010 WA 3 0 8 [ 9] .got PROGBITS 0000000000011fe0 00001fe0 0000000000000008 0000000000000008 WA 0 0 8 [10] .got.plt PROGBITS 0000000000011fe8 00001fe8 0000000000000020 0000000000000008 WA 0 0 8 [11] .comment PROGBITS 0000000000000000 00002008 0000000000000107 0000000000000001 MS 0 0 1 [12] .debug_pubnames PROGBITS 0000000000000000 0000210f 00000000000002a2 0000000000000000 0 0 1 [13] .debug_info PROGBITS 0000000000000000 000023b1 0000000000000997 0000000000000000 0 0 1 [14] .debug_abbrev PROGBITS 0000000000000000 00002d48 00000000000000f1 0000000000000000 0 0 1 [15] .debug_line PROGBITS 0000000000000000 00002e39 00000000000002f5 0000000000000000 0 0 1 [16] .debug_frame PROGBITS 0000000000000000 00003130 0000000000000350 0000000000000000 0 0 8 [17] .debug_str PROGBITS 0000000000000000 00003480 0000000000000667 0000000000000001 MS 0 0 1 [18] .debug_loc PROGBITS 0000000000000000 00003ae7 000000000000087a 0000000000000000 0 0 1 [19] .debug_macinfo PROGBITS 0000000000000000 00004361 0000000000000001 0000000000000000 0 0 1 [20] .debug_pubtypes PROGBITS 0000000000000000 00004362 0000000000000208 0000000000000000 0 0 1 [21] .shstrtab STRTAB 0000000000000000 00004f24 00000000000000e1 0000000000000000 0 0 1 [22] .symtab SYMTAB 0000000000000000 00004570 00000000000006d8 0000000000000018 23 45 8 [23] .strtab STRTAB 0000000000000000 00004c48 00000000000002dc 0000000000000000 0 0 1Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), I (info), L (link order), O (extra OS processing required), G (group), T (TLS), C (compressed), x (unknown), o (OS specific), E (exclude), p (processor specific)
复制代码- readelf.exe -g libcdsprpc.soThere are no section groups in this file.
复制代码- readelf.exe -t libcdsprpc.soThere are 24 section headers, starting at offset 0x5008:Section Headers: [Nr] Name Type Address Offset Link Size EntSize Info Align Flags [ 0] NULL 0000000000000000 0000000000000000 0 0000000000000000 0000000000000000 0 0 [0000000000000000]: [ 1] .hash HASH 0000000000000158 0000000000000158 2 00000000000000c4 0000000000000004 0 8 [0000000000000002]: ALLOC [ 2] .dynsym DYNSYM 0000000000000220 0000000000000220 3 00000000000002d0 0000000000000018 2 8 [0000000000000002]: ALLOC [ 3] .dynstr STRTAB 00000000000004f0 00000000000004f0 0 000000000000026a 0000000000000000 0 1 [0000000000000002]: ALLOC [ 4] .rela.plt RELA 0000000000000760 0000000000000760 2 0000000000000018 0000000000000018 10 8 [0000000000000042]: ALLOC, INFO LINK [ 5] .plt PROGBITS 0000000000000780 0000000000000780 0 0000000000000030 0000000000000010 0 16 [0000000000000006]: ALLOC, EXEC [ 6] .text PROGBITS 00000000000007b0 00000000000007b0 0 00000000000003f8 0000000000000000 0 4 [0000000000000006]: ALLOC, EXEC [ 7] .rodata PROGBITS 0000000000000ba8 0000000000000ba8 0 00000000000004e8 0000000000000001 0 1 [0000000000000032]: ALLOC, MERGE, STRINGS [ 8] .dynamic DYNAMIC 0000000000011ea0 0000000000001ea0 3 0000000000000140 0000000000000010 0 8 [0000000000000003]: WRITE, ALLOC [ 9] .got PROGBITS 0000000000011fe0 0000000000001fe0 0 0000000000000008 0000000000000008 0 8 [0000000000000003]: WRITE, ALLOC [10] .got.plt PROGBITS 0000000000011fe8 0000000000001fe8 0 0000000000000020 0000000000000008 0 8 [0000000000000003]: WRITE, ALLOC [11] .comment PROGBITS 0000000000000000 0000000000002008 0 0000000000000107 0000000000000001 0 1 [0000000000000030]: MERGE, STRINGS [12] .debug_pubnames PROGBITS 0000000000000000 000000000000210f 0 00000000000002a2 0000000000000000 0 1 [0000000000000000]: [13] .debug_info PROGBITS 0000000000000000 00000000000023b1 0 0000000000000997 0000000000000000 0 1 [0000000000000000]: [14] .debug_abbrev PROGBITS 0000000000000000 0000000000002d48 0 00000000000000f1 0000000000000000 0 1 [0000000000000000]: [15] .debug_line PROGBITS 0000000000000000 0000000000002e39 0 00000000000002f5 0000000000000000 0 1 [0000000000000000]: [16] .debug_frame PROGBITS 0000000000000000 0000000000003130 0 0000000000000350 0000000000000000 0 8 [0000000000000000]: [17] .debug_str PROGBITS 0000000000000000 0000000000003480 0 0000000000000667 0000000000000001 0 1 [0000000000000030]: MERGE, STRINGS [18] .debug_loc PROGBITS 0000000000000000 0000000000003ae7 0 000000000000087a 0000000000000000 0 1 [0000000000000000]: [19] .debug_macinfo PROGBITS 0000000000000000 0000000000004361 0 0000000000000001 0000000000000000 0 1 [0000000000000000]: [20] .debug_pubtypes PROGBITS 0000000000000000 0000000000004362 0 0000000000000208 0000000000000000 0 1 [0000000000000000]: [21] .shstrtab STRTAB 0000000000000000 0000000000004f24 0 00000000000000e1 0000000000000000 0 1 [0000000000000000]: [22] .symtab SYMTAB 0000000000000000 0000000000004570 23 00000000000006d8 0000000000000018 45 8 [0000000000000000]: [23] .strtab STRTAB 0000000000000000 0000000000004c48 0 00000000000002dc 0000000000000000 0 1 [0000000000000000]:
复制代码- readelf.exe -s libcdsprpc.soSymbol table '.dynsym' contains 30 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000000007b0 0 SECTION LOCAL DEFAULT 6 2: 0000000000000b50 44 FUNC GLOBAL DEFAULT 6 fastrpc_async_get_status 3: 000000000000093c 44 FUNC GLOBAL DEFAULT 6 remote_handle_close 4: 0000000000000968 44 FUNC GLOBAL DEFAULT 6 remote_handle_control 5: 0000000000000a30 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke 6: 0000000000000a88 44 FUNC GLOBAL DEFAULT 6 remote_handle64_close 7: 0000000000000b7c 44 FUNC GLOBAL DEFAULT 6 fastrpc_release_async_job 8: 00000000000009c8 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 9: 000000000000088c 44 FUNC GLOBAL DEFAULT 6 remote_munmap 10: 0000000000000ae0 44 FUNC GLOBAL DEFAULT 6 rpcmem_alloc 11: 0000000000000b24 44 FUNC GLOBAL DEFAULT 6 rpcmem_to_fd 12: 00000000000007dc 44 FUNC GLOBAL DEFAULT 6 remote_mem_unmap 13: 00000000000009d8 44 FUNC GLOBAL DEFAULT 6 remote_set_mode 14: 0000000000000a04 44 FUNC GLOBAL DEFAULT 6 remote_handle64_open 15: 00000000000008e4 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke 16: 0000000000000834 44 FUNC GLOBAL DEFAULT 6 remote_munmap64 17: 00000000000008b8 44 FUNC GLOBAL DEFAULT 6 remote_handle_open 18: 00000000000009d0 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 19: 0000000000000ab4 44 FUNC GLOBAL DEFAULT 6 remote_handle64_control 20: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __android_log_print 21: 0000000000000910 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke_asyn 22: 00000000000009c0 4 FUNC GLOBAL DEFAULT 6 remote_register_buf 23: 0000000000000a5c 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke_as 24: 00000000000009c4 4 FUNC GLOBAL DEFAULT 6 remote_register_buf_attr 25: 0000000000000994 44 FUNC GLOBAL DEFAULT 6 remote_session_control 26: 0000000000000b0c 24 FUNC GLOBAL DEFAULT 6 rpcmem_free 27: 0000000000000808 44 FUNC GLOBAL DEFAULT 6 remote_mmap64 28: 00000000000007b0 44 FUNC GLOBAL DEFAULT 6 remote_mem_map 29: 0000000000000860 44 FUNC GLOBAL DEFAULT 6 remote_mmapSymbol table '.symtab' contains 73 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000158 0 SECTION LOCAL DEFAULT 1 2: 0000000000000220 0 SECTION LOCAL DEFAULT 2 3: 00000000000004f0 0 SECTION LOCAL DEFAULT 3 4: 0000000000000760 0 SECTION LOCAL DEFAULT 4 5: 0000000000000780 0 SECTION LOCAL DEFAULT 5 6: 00000000000007b0 0 SECTION LOCAL DEFAULT 6 7: 0000000000000ba8 0 SECTION LOCAL DEFAULT 7 8: 0000000000011ea0 0 SECTION LOCAL DEFAULT 8 9: 0000000000011fe0 0 SECTION LOCAL DEFAULT 9 10: 0000000000011fe8 0 SECTION LOCAL DEFAULT 10 11: 0000000000000000 0 SECTION LOCAL DEFAULT 11 12: 0000000000000000 0 SECTION LOCAL DEFAULT 12 13: 0000000000000000 0 SECTION LOCAL DEFAULT 13 14: 0000000000000000 0 SECTION LOCAL DEFAULT 14 15: 0000000000000000 0 SECTION LOCAL DEFAULT 15 16: 0000000000000000 0 SECTION LOCAL DEFAULT 16 17: 0000000000000000 0 SECTION LOCAL DEFAULT 17 18: 0000000000000000 0 SECTION LOCAL DEFAULT 18 19: 0000000000000000 0 SECTION LOCAL DEFAULT 19 20: 0000000000000000 0 SECTION LOCAL DEFAULT 20 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS remote.c 22: 0000000000000ba8 0 NOTYPE LOCAL DEFAULT 7 $d.1 23: 0000000000000000 0 NOTYPE LOCAL DEFAULT 16 $d.10 24: 0000000000000000 0 NOTYPE LOCAL DEFAULT 15 $d.11 25: 0000000000000000 0 NOTYPE LOCAL DEFAULT 17 $d.2 26: 0000000000000000 0 NOTYPE LOCAL DEFAULT 18 $d.3 27: 0000000000000000 0 NOTYPE LOCAL DEFAULT 14 $d.4 28: 0000000000000000 0 NOTYPE LOCAL DEFAULT 13 $d.5 29: 0000000000000000 0 NOTYPE LOCAL DEFAULT 19 $d.6 30: 0000000000000000 0 NOTYPE LOCAL DEFAULT 12 $d.7 31: 0000000000000000 0 NOTYPE LOCAL DEFAULT 20 $d.8 32: 0000000000000106 0 NOTYPE LOCAL DEFAULT 11 $d.9 33: 00000000000007b0 0 NOTYPE LOCAL DEFAULT 6 $x.0 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS 35: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS _bss_end__ 36: 0000000000011ea0 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC 37: 0000000000011fe0 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ 38: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS __bss_start 39: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS __end__ 40: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS __bss_start__ 41: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS _edata 42: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS __bss_end__ 43: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS _end 44: 0000000000000780 0 NOTYPE LOCAL DEFAULT 5 $x 45: 0000000000000b50 44 FUNC GLOBAL DEFAULT 6 fastrpc_async_get_status 46: 000000000000093c 44 FUNC GLOBAL DEFAULT 6 remote_handle_close 47: 0000000000000968 44 FUNC GLOBAL DEFAULT 6 remote_handle_control 48: 0000000000000a30 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke 49: 0000000000000a88 44 FUNC GLOBAL DEFAULT 6 remote_handle64_close 50: 0000000000000b7c 44 FUNC GLOBAL DEFAULT 6 fastrpc_release_async_job 51: 00000000000009c8 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 52: 000000000000088c 44 FUNC GLOBAL DEFAULT 6 remote_munmap 53: 0000000000000ae0 44 FUNC GLOBAL DEFAULT 6 rpcmem_alloc 54: 0000000000000b24 44 FUNC GLOBAL DEFAULT 6 rpcmem_to_fd 55: 00000000000007dc 44 FUNC GLOBAL DEFAULT 6 remote_mem_unmap 56: 00000000000009d8 44 FUNC GLOBAL DEFAULT 6 remote_set_mode 57: 0000000000000a04 44 FUNC GLOBAL DEFAULT 6 remote_handle64_open 58: 00000000000008e4 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke 59: 0000000000000834 44 FUNC GLOBAL DEFAULT 6 remote_munmap64 60: 00000000000008b8 44 FUNC GLOBAL DEFAULT 6 remote_handle_open 61: 00000000000009d0 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 62: 0000000000000ab4 44 FUNC GLOBAL DEFAULT 6 remote_handle64_control 63: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __android_log_print 64: 0000000000000910 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke_asyn 65: 00000000000009c0 4 FUNC GLOBAL DEFAULT 6 remote_register_buf 66: 0000000000000a5c 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke_as 67: 00000000000009c4 4 FUNC GLOBAL DEFAULT 6 remote_register_buf_attr 68: 0000000000000994 44 FUNC GLOBAL DEFAULT 6 remote_session_control 69: 0000000000000b0c 24 FUNC GLOBAL DEFAULT 6 rpcmem_free 70: 0000000000000808 44 FUNC GLOBAL DEFAULT 6 remote_mmap64 71: 00000000000007b0 44 FUNC GLOBAL DEFAULT 6 remote_mem_map 72: 0000000000000860 44 FUNC GLOBAL DEFAULT 6 remote_mmap
复制代码- readelf.exe -n libcdsprpc.so
复制代码- readelf.exe -r libcdsprpc.soRelocation section '.rela.plt' at offset 0x760 contains 1 entry: Offset Info Type Sym. Value Sym. Name + Addend000000012000 001400000402 R_AARCH64_JUMP_SL 0000000000000000 __android_log_print + 0
复制代码- readelf.exe -u libcdsprpc.soThe decoding of unwind sections for machine type AArch64 is not currently supported.
复制代码- readelf.exe -d libcdsprpc.soDynamic section at offset 0x1ea0 contains 15 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [liblog.so] 0x0000000000000001 (NEEDED) Shared library: [libm.so] 0x0000000000000001 (NEEDED) Shared library: [libc.so] 0x0000000000000001 (NEEDED) Shared library: [libdl.so] 0x000000000000000e (SONAME) Library soname: [libcdsprpc.so] 0x0000000000000004 (HASH) 0x158 0x0000000000000005 (STRTAB) 0x4f0 0x0000000000000006 (SYMTAB) 0x220 0x000000000000000a (STRSZ) 618 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000003 (PLTGOT) 0x11fe8 0x0000000000000002 (PLTRELSZ) 24 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x760 0x0000000000000000 (NULL) 0x0
复制代码- readelf.exe -V libcdsprpc.soNo version information found in this file.
复制代码- readelf.exe -A libcdsprpc.so
复制代码- readelf.exe -c libcdsprpc.soreadelf: Error: File libcdsprpc.so is not an archive so its index cannot be displayed.
复制代码- readelf.exe -s -D libcdsprpc.soSymbol table for image: Num Buc: Value Size Type Bind Vis Ndx Name 16 0: 0000000000000834 44 FUNC GLOBAL DEFAULT 6 remote_munmap64 10 0: 0000000000000ae0 44 FUNC GLOBAL DEFAULT 6 rpcmem_alloc 8 0: 00000000000009c8 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 24 1: 00000000000009c4 4 FUNC GLOBAL DEFAULT 6 remote_register_buf_attr 17 1: 00000000000008b8 44 FUNC GLOBAL DEFAULT 6 remote_handle_open 25 2: 0000000000000994 44 FUNC GLOBAL DEFAULT 6 remote_session_control 7 2: 0000000000000b7c 44 FUNC GLOBAL DEFAULT 6 fastrpc_release_async_job 29 4: 0000000000000860 44 FUNC GLOBAL DEFAULT 6 remote_mmap 3 4: 000000000000093c 44 FUNC GLOBAL DEFAULT 6 remote_handle_close 9 5: 000000000000088c 44 FUNC GLOBAL DEFAULT 6 remote_munmap 26 6: 0000000000000b0c 24 FUNC GLOBAL DEFAULT 6 rpcmem_free 22 7: 00000000000009c0 4 FUNC GLOBAL DEFAULT 6 remote_register_buf 6 7: 0000000000000a88 44 FUNC GLOBAL DEFAULT 6 remote_handle64_close 20 8: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __android_log_print 14 8: 0000000000000a04 44 FUNC GLOBAL DEFAULT 6 remote_handle64_open 15 11: 00000000000008e4 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke 28 12: 00000000000007b0 44 FUNC GLOBAL DEFAULT 6 remote_mem_map 21 12: 0000000000000910 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke_asyn 13 12: 00000000000009d8 44 FUNC GLOBAL DEFAULT 6 remote_set_mode 5 13: 0000000000000a30 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke 27 14: 0000000000000808 44 FUNC GLOBAL DEFAULT 6 remote_mmap64 4 14: 0000000000000968 44 FUNC GLOBAL DEFAULT 6 remote_handle_control 23 15: 0000000000000a5c 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke_as 19 16: 0000000000000ab4 44 FUNC GLOBAL DEFAULT 6 remote_handle64_control 18 16: 00000000000009d0 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 12 16: 00000000000007dc 44 FUNC GLOBAL DEFAULT 6 remote_mem_unmap 11 16: 0000000000000b24 44 FUNC GLOBAL DEFAULT 6 rpcmem_to_fd 2 16: 0000000000000b50 44 FUNC GLOBAL DEFAULT 6 fastrpc_async_get_status
复制代码- readelf.exe -p .comment libcdsprpc.soString dump of section '.comment': [ 0] Android (5058415 based on r339409) clang version 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec746213857d083c0e8b0abb568790) (https://android.googlesource.com/toolchain/llvm 7a6618d69e7e8111e1d49dc9e7813767c5ca756a) (based on LLVM 8.0.2svn)
复制代码- readelf.exe -s -I libcdsprpc.soSymbol table '.dynsym' contains 30 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000000007b0 0 SECTION LOCAL DEFAULT 6 2: 0000000000000b50 44 FUNC GLOBAL DEFAULT 6 fastrpc_async_get_status 3: 000000000000093c 44 FUNC GLOBAL DEFAULT 6 remote_handle_close 4: 0000000000000968 44 FUNC GLOBAL DEFAULT 6 remote_handle_control 5: 0000000000000a30 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke 6: 0000000000000a88 44 FUNC GLOBAL DEFAULT 6 remote_handle64_close 7: 0000000000000b7c 44 FUNC GLOBAL DEFAULT 6 fastrpc_release_async_job 8: 00000000000009c8 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 9: 000000000000088c 44 FUNC GLOBAL DEFAULT 6 remote_munmap 10: 0000000000000ae0 44 FUNC GLOBAL DEFAULT 6 rpcmem_alloc 11: 0000000000000b24 44 FUNC GLOBAL DEFAULT 6 rpcmem_to_fd 12: 00000000000007dc 44 FUNC GLOBAL DEFAULT 6 remote_mem_unmap 13: 00000000000009d8 44 FUNC GLOBAL DEFAULT 6 remote_set_mode 14: 0000000000000a04 44 FUNC GLOBAL DEFAULT 6 remote_handle64_open 15: 00000000000008e4 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke 16: 0000000000000834 44 FUNC GLOBAL DEFAULT 6 remote_munmap64 17: 00000000000008b8 44 FUNC GLOBAL DEFAULT 6 remote_handle_open 18: 00000000000009d0 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 19: 0000000000000ab4 44 FUNC GLOBAL DEFAULT 6 remote_handle64_control 20: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __android_log_print 21: 0000000000000910 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke_asyn 22: 00000000000009c0 4 FUNC GLOBAL DEFAULT 6 remote_register_buf 23: 0000000000000a5c 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke_as 24: 00000000000009c4 4 FUNC GLOBAL DEFAULT 6 remote_register_buf_attr 25: 0000000000000994 44 FUNC GLOBAL DEFAULT 6 remote_session_control 26: 0000000000000b0c 24 FUNC GLOBAL DEFAULT 6 rpcmem_free 27: 0000000000000808 44 FUNC GLOBAL DEFAULT 6 remote_mmap64 28: 00000000000007b0 44 FUNC GLOBAL DEFAULT 6 remote_mem_map 29: 0000000000000860 44 FUNC GLOBAL DEFAULT 6 remote_mmapSymbol table '.symtab' contains 73 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000158 0 SECTION LOCAL DEFAULT 1 2: 0000000000000220 0 SECTION LOCAL DEFAULT 2 3: 00000000000004f0 0 SECTION LOCAL DEFAULT 3 4: 0000000000000760 0 SECTION LOCAL DEFAULT 4 5: 0000000000000780 0 SECTION LOCAL DEFAULT 5 6: 00000000000007b0 0 SECTION LOCAL DEFAULT 6 7: 0000000000000ba8 0 SECTION LOCAL DEFAULT 7 8: 0000000000011ea0 0 SECTION LOCAL DEFAULT 8 9: 0000000000011fe0 0 SECTION LOCAL DEFAULT 9 10: 0000000000011fe8 0 SECTION LOCAL DEFAULT 10 11: 0000000000000000 0 SECTION LOCAL DEFAULT 11 12: 0000000000000000 0 SECTION LOCAL DEFAULT 12 13: 0000000000000000 0 SECTION LOCAL DEFAULT 13 14: 0000000000000000 0 SECTION LOCAL DEFAULT 14 15: 0000000000000000 0 SECTION LOCAL DEFAULT 15 16: 0000000000000000 0 SECTION LOCAL DEFAULT 16 17: 0000000000000000 0 SECTION LOCAL DEFAULT 17 18: 0000000000000000 0 SECTION LOCAL DEFAULT 18 19: 0000000000000000 0 SECTION LOCAL DEFAULT 19 20: 0000000000000000 0 SECTION LOCAL DEFAULT 20 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS remote.c 22: 0000000000000ba8 0 NOTYPE LOCAL DEFAULT 7 $d.1 23: 0000000000000000 0 NOTYPE LOCAL DEFAULT 16 $d.10 24: 0000000000000000 0 NOTYPE LOCAL DEFAULT 15 $d.11 25: 0000000000000000 0 NOTYPE LOCAL DEFAULT 17 $d.2 26: 0000000000000000 0 NOTYPE LOCAL DEFAULT 18 $d.3 27: 0000000000000000 0 NOTYPE LOCAL DEFAULT 14 $d.4 28: 0000000000000000 0 NOTYPE LOCAL DEFAULT 13 $d.5 29: 0000000000000000 0 NOTYPE LOCAL DEFAULT 19 $d.6 30: 0000000000000000 0 NOTYPE LOCAL DEFAULT 12 $d.7 31: 0000000000000000 0 NOTYPE LOCAL DEFAULT 20 $d.8 32: 0000000000000106 0 NOTYPE LOCAL DEFAULT 11 $d.9 33: 00000000000007b0 0 NOTYPE LOCAL DEFAULT 6 $x.0 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS 35: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS _bss_end__ 36: 0000000000011ea0 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC 37: 0000000000011fe0 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ 38: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS __bss_start 39: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS __end__ 40: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS __bss_start__ 41: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS _edata 42: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS __bss_end__ 43: 0000000000012008 0 NOTYPE LOCAL DEFAULT ABS _end 44: 0000000000000780 0 NOTYPE LOCAL DEFAULT 5 $x 45: 0000000000000b50 44 FUNC GLOBAL DEFAULT 6 fastrpc_async_get_status 46: 000000000000093c 44 FUNC GLOBAL DEFAULT 6 remote_handle_close 47: 0000000000000968 44 FUNC GLOBAL DEFAULT 6 remote_handle_control 48: 0000000000000a30 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke 49: 0000000000000a88 44 FUNC GLOBAL DEFAULT 6 remote_handle64_close 50: 0000000000000b7c 44 FUNC GLOBAL DEFAULT 6 fastrpc_release_async_job 51: 00000000000009c8 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 52: 000000000000088c 44 FUNC GLOBAL DEFAULT 6 remote_munmap 53: 0000000000000ae0 44 FUNC GLOBAL DEFAULT 6 rpcmem_alloc 54: 0000000000000b24 44 FUNC GLOBAL DEFAULT 6 rpcmem_to_fd 55: 00000000000007dc 44 FUNC GLOBAL DEFAULT 6 remote_mem_unmap 56: 00000000000009d8 44 FUNC GLOBAL DEFAULT 6 remote_set_mode 57: 0000000000000a04 44 FUNC GLOBAL DEFAULT 6 remote_handle64_open 58: 00000000000008e4 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke 59: 0000000000000834 44 FUNC GLOBAL DEFAULT 6 remote_munmap64 60: 00000000000008b8 44 FUNC GLOBAL DEFAULT 6 remote_handle_open 61: 00000000000009d0 8 FUNC GLOBAL DEFAULT 6 remote_register_dma_handl 62: 0000000000000ab4 44 FUNC GLOBAL DEFAULT 6 remote_handle64_control 63: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __android_log_print 64: 0000000000000910 44 FUNC GLOBAL DEFAULT 6 remote_handle_invoke_asyn 65: 00000000000009c0 4 FUNC GLOBAL DEFAULT 6 remote_register_buf 66: 0000000000000a5c 44 FUNC GLOBAL DEFAULT 6 remote_handle64_invoke_as 67: 00000000000009c4 4 FUNC GLOBAL DEFAULT 6 remote_register_buf_attr 68: 0000000000000994 44 FUNC GLOBAL DEFAULT 6 remote_session_control 69: 0000000000000b0c 24 FUNC GLOBAL DEFAULT 6 rpcmem_free 70: 0000000000000808 44 FUNC GLOBAL DEFAULT 6 remote_mmap64 71: 00000000000007b0 44 FUNC GLOBAL DEFAULT 6 remote_mem_map 72: 0000000000000860 44 FUNC GLOBAL DEFAULT 6 remote_mmapHistogram for bucket list length (total of 17 buckets): Length Number % of total Coverage 0 3 ( 17.6%) 1 5 ( 29.4%) 17.9% 2 6 ( 35.3%) 60.7% 3 2 ( 11.8%) 82.1% 4 0 ( 0.0%) 82.1% 5 1 ( 5.9%) 100.0%
复制代码- readelf.exe -vGNU readelf (GNU Binutils) 2.32Copyright (C) 2019 Free Software Foundation, Inc.This program is free software; you may redistribute it under the terms ofthe GNU General Public License version 3 or (at your option) any later version.This program has absolutely no warranty.
复制代码 来源:https://blog.csdn.net/LYJ_viviani/article/details/111944669
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |