mirror of
https://github.com/beyondx/Notes.git
synced 2026-02-04 02:43:32 +08:00
279 lines
15 KiB
Plaintext
279 lines
15 KiB
Plaintext
Content-Type: text/x-zim-wiki
|
||
Wiki-Format: zim 0.4
|
||
Creation-Date: 2012-05-22T13:09:44+08:00
|
||
|
||
====== elf ======
|
||
Created Tuesday 22 May 2012
|
||
|
||
ELF Header:
|
||
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
|
||
Class: ELF32
|
||
Data: 2's complement, little endian
|
||
Version: 1 (current)
|
||
OS/ABI: UNIX - System V
|
||
ABI Version: 0
|
||
Type: EXEC (Executable file)
|
||
Machine: Intel 80386
|
||
Version: 0x1
|
||
Entry point address: 0x8048460
|
||
Start of program headers: 52 (bytes into file)
|
||
Start of section headers: 4572 (bytes into file)
|
||
Flags: 0x0
|
||
Size of this header: 52 (bytes)
|
||
Size of program headers: 32 (bytes)
|
||
Number of program headers: 8
|
||
Size of section headers: 40 (bytes)
|
||
Number of section headers: 37
|
||
Section header string table index: 34
|
||
|
||
**Section Headers:**
|
||
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
|
||
[ 0] NULL 00000000 000000 000000 00 0 0 0
|
||
[ 1] .interp PROGBITS 08048134 000134 000013 00 A 0 0 1
|
||
[ 2] .note.ABI-tag NOTE 08048148 000148 000020 00 A 0 0 4
|
||
[ 3] .note.gnu.build-i NOTE 08048168 000168 000024 00 A 0 0 4
|
||
[ 4] .hash HASH 0804818c 00018c 000040 04 A 6 0 4
|
||
[ 5] .gnu.hash GNU_HASH 080481cc 0001cc 000024 04 A 6 0 4
|
||
[ 6]__ .dynsym __ DYNSYM 080481f0 0001f0 0000b0 10 A 7 1 4
|
||
[ 7]__ .dynstr __ STRTAB 080482a0 0002a0 000072 00 A 0 0 1
|
||
[ 8] .gnu.version VERSYM 08048312 000312 000016 02 A 6 0 2
|
||
[ 9] .gnu.version_r VERNEED 08048328 000328 000020 00 A 7 1 4
|
||
[10]** .rel.dyn ** REL 08048348 000348 000010 08 A 6 0 4
|
||
[11]** .rel.plt ** REL 08048358 000358 000040 08 A 6 13 4
|
||
[12] .init PROGBITS 08048398 000398 00002e 00 AX 0 0 4
|
||
[13] .plt PROGBITS 080483d0 0003d0 000090 04 AX 0 0 16
|
||
[14] .text PROGBITS 08048460 000460 00021c 00 AX 0 0 16
|
||
[15] .fini PROGBITS 0804867c 00067c 00001a 00 AX 0 0 4
|
||
[16] .rodata PROGBITS 08048698 000698 00006a 00 A 0 0 4
|
||
[17] .eh_frame_hdr PROGBITS 08048704 000704 000034 00 A 0 0 4
|
||
[18] .eh_frame PROGBITS 08048738 000738 0000c0 00 A 0 0 4
|
||
[19] .ctors PROGBITS 080497f8 0007f8 000008 00 WA 0 0 4
|
||
[20] .dtors PROGBITS 08049800 000800 000008 00 WA 0 0 4
|
||
[21] .jcr PROGBITS 08049808 000808 000004 00 WA 0 0 4
|
||
[22] .dynamic DYNAMIC 0804980c 00080c 0000d0 08 WA 7 0 4
|
||
[23] .got PROGBITS 080498dc 0008dc 000004 04 WA 0 0 4
|
||
[24] .got.plt PROGBITS 080498e0 0008e0 00002c 04 WA 0 0 4
|
||
[25] .data PROGBITS 0804990c 00090c 000008 00 WA 0 0 4
|
||
[26] .bss NOBITS 08049920 000914 00000c 00 WA 0 0 32
|
||
[27] .comment PROGBITS 00000000 000914 000027 01 MS 0 0 1
|
||
[28] .debug_aranges PROGBITS 00000000 00093b 000020 00 0 0 1
|
||
[29] .debug_info PROGBITS 00000000 00095b 000328 00 0 0 1
|
||
[30] .debug_abbrev PROGBITS 00000000 000c83 0000f8 00 0 0 1
|
||
[31] .debug_line PROGBITS 00000000 000d7b 0000d4 00 0 0 1
|
||
[32] .debug_str PROGBITS 00000000 000e4f 000218 01 MS 0 0 1
|
||
[33] .debug_loc PROGBITS 00000000 001067 00002c 00 0 0 1
|
||
[34]__ .shstrtab __ STRTAB 00000000 001093 000147 00 0 0 1
|
||
[35]__ .symtab __ SYMTAB 00000000 0017a4 000510 10 36 55 4
|
||
[36]__ .strtab __ STRTAB 00000000 001cb4 000277 00 0 0 1
|
||
Key to Flags:
|
||
W (write), A (alloc), X (execute), M (merge), S (strings)
|
||
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
|
||
O (extra OS processing required) o (OS specific), p (processor specific)
|
||
#shstrtab标示该段对应的内容为一个字符串表,表中的字符串对应每个段的名称。
|
||
#symtab标示该段对应的内容为一个符号表,表中每个符号的名称放在.strtab表中。
|
||
#strtab对应的段中放的是符号表中各符号的名称
|
||
#dynsym表示段中放的是需要动态链接的符号
|
||
#dynstr表示段中存放的时需要动态链接的符号的名称(和dynsym配合使用)
|
||
#一般dynsym中的符号是symtab中的一部分,后者包含的用于link editing 和dynamic linking的所有符号。
|
||
|
||
|
||
There are no section groups in this file.
|
||
|
||
Program Headers:
|
||
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
|
||
PHDR 0x000034 0x08048034 0x08048034 0x00100 0x00100 R E 0x4
|
||
INTERP 0x000134 0x08048134 0x08048134 0x00013 0x00013 R 0x1
|
||
[Requesting program interpreter: /lib/ld-linux.so.2]
|
||
LOAD 0x000000 0x08048000 0x08048000 0x007f8 0x007f8 R E 0x1000
|
||
LOAD 0x0007f8 0x080497f8 0x080497f8 0x0011c 0x00134 RW 0x1000
|
||
DYNAMIC 0x00080c 0x0804980c 0x0804980c 0x000d0 0x000d0 RW 0x4
|
||
NOTE 0x000148 0x08048148 0x08048148 0x00044 0x00044 R 0x4
|
||
GNU_EH_FRAME 0x000704 0x08048704 0x08048704 0x00034 0x00034 R 0x4
|
||
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
|
||
|
||
Section to Segment mapping:
|
||
Segment Sections...
|
||
00
|
||
01 .interp
|
||
02 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
|
||
03 .ctors .dtors .jcr .dynamic .got .got.plt .data .bss
|
||
04 .dynamic
|
||
05 .note.ABI-tag .note.gnu.build-id
|
||
06 .eh_frame_hdr
|
||
07
|
||
|
||
Dynamic section at offset 0x80c contains 21 entries:
|
||
Tag Type Name/Value
|
||
0x00000001 (NEEDED) Shared library: [libc.so.6]
|
||
0x0000000c (INIT) 0x8048398
|
||
0x0000000d (FINI) 0x804867c
|
||
0x00000004 (HASH) 0x804818c
|
||
0x6ffffef5 (GNU_HASH) 0x80481cc
|
||
0x00000005 (STRTAB) 0x80482a0
|
||
0x00000006 (SYMTAB) 0x80481f0
|
||
0x0000000a (STRSZ) 114 (bytes)
|
||
0x0000000b (SYMENT) 16 (bytes)
|
||
0x00000015 (DEBUG) 0x0
|
||
0x00000003 (PLTGOT) 0x80498e0
|
||
0x00000002 (PLTRELSZ) 64 (bytes)
|
||
0x00000014 (PLTREL) REL
|
||
0x00000017 (JMPREL) 0x8048358
|
||
0x00000011 (REL) 0x8048348
|
||
0x00000012 (RELSZ) 16 (bytes)
|
||
0x00000013 (RELENT) 8 (bytes)
|
||
0x6ffffffe (VERNEED) 0x8048328
|
||
0x6fffffff (VERNEEDNUM) 1
|
||
0x6ffffff0 (VERSYM) 0x8048312
|
||
0x00000000 (NULL) 0x0
|
||
|
||
Relocation section '.rel.dyn' at offset 0x348 contains 2 entries:
|
||
Offset Info Type Sym.Value Sym. Name
|
||
080498dc 00000506 R_386_GLOB_DAT 00000000 __gmon_start__
|
||
08049920 00000905 R_386_COPY 08049920 stdout
|
||
|
||
Relocation section '.rel.plt' at offset 0x358 contains 8 entries:
|
||
Offset Info Type Sym.Value Sym. Name
|
||
080498ec 00000107 R_386_JUMP_SLOT 00000000 printf
|
||
080498f0 00000207 R_386_JUMP_SLOT 00000000 fflush
|
||
080498f4 00000307 R_386_JUMP_SLOT 00000000 sleep
|
||
080498f8 00000407 R_386_JUMP_SLOT 00000000 puts
|
||
080498fc 00000507 R_386_JUMP_SLOT 00000000 __gmon_start__
|
||
08049900 00000607 R_386_JUMP_SLOT 00000000 exit
|
||
08049904 00000707 R_386_JUMP_SLOT 00000000 __libc_start_main
|
||
08049908 00000807 R_386_JUMP_SLOT 00000000 putchar
|
||
|
||
There are no unwind sections in this file.
|
||
|
||
Symbol table '.dynsym' contains 11 entries:
|
||
Num: Value Size Type Bind Vis Ndx Name
|
||
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
|
||
1: 00000000 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.0 (2)
|
||
2: 00000000 0 FUNC GLOBAL DEFAULT UND fflush@GLIBC_2.0 (2)
|
||
3: 00000000 0 FUNC GLOBAL DEFAULT UND sleep@GLIBC_2.0 (2)
|
||
4: 00000000 0 FUNC GLOBAL DEFAULT UND puts@GLIBC_2.0 (2)
|
||
5: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
|
||
6: 00000000 0 FUNC GLOBAL DEFAULT UND exit@GLIBC_2.0 (2)
|
||
7: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0 (2)
|
||
8: 00000000 0 FUNC GLOBAL DEFAULT UND putchar@GLIBC_2.0 (2)
|
||
9: 08049920 4 OBJECT GLOBAL DEFAULT 26 stdout@GLIBC_2.0 (2)
|
||
10: 0804869c 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used
|
||
|
||
Symbol table '.symtab' contains 81 entries:
|
||
Num: Value Size Type Bind Vis Ndx Name
|
||
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
|
||
1: 08048134 0 SECTION LOCAL DEFAULT 1
|
||
2: 08048148 0 SECTION LOCAL DEFAULT 2
|
||
3: 08048168 0 SECTION LOCAL DEFAULT 3
|
||
4: 0804818c 0 SECTION LOCAL DEFAULT 4
|
||
5: 080481cc 0 SECTION LOCAL DEFAULT 5
|
||
6: 080481f0 0 SECTION LOCAL DEFAULT 6
|
||
7: 080482a0 0 SECTION LOCAL DEFAULT 7
|
||
8: 08048312 0 SECTION LOCAL DEFAULT 8
|
||
9: 08048328 0 SECTION LOCAL DEFAULT 9
|
||
10: 08048348 0 SECTION LOCAL DEFAULT 10
|
||
11: 08048358 0 SECTION LOCAL DEFAULT 11
|
||
12: 08048398 0 SECTION LOCAL DEFAULT 12
|
||
13: 080483d0 0 SECTION LOCAL DEFAULT 13
|
||
14: 08048460 0 SECTION LOCAL DEFAULT 14
|
||
15: 0804867c 0 SECTION LOCAL DEFAULT 15
|
||
16: 08048698 0 SECTION LOCAL DEFAULT 16
|
||
17: 08048704 0 SECTION LOCAL DEFAULT 17
|
||
18: 08048738 0 SECTION LOCAL DEFAULT 18
|
||
19: 080497f8 0 SECTION LOCAL DEFAULT 19
|
||
20: 08049800 0 SECTION LOCAL DEFAULT 20
|
||
21: 08049808 0 SECTION LOCAL DEFAULT 21
|
||
22: 0804980c 0 SECTION LOCAL DEFAULT 22
|
||
23: 080498dc 0 SECTION LOCAL DEFAULT 23
|
||
24: 080498e0 0 SECTION LOCAL DEFAULT 24
|
||
25: 0804990c 0 SECTION LOCAL DEFAULT 25
|
||
26: 08049920 0 SECTION LOCAL DEFAULT 26
|
||
27: 00000000 0 SECTION LOCAL DEFAULT 27
|
||
28: 00000000 0 SECTION LOCAL DEFAULT 28
|
||
29: 00000000 0 SECTION LOCAL DEFAULT 29
|
||
30: 00000000 0 SECTION LOCAL DEFAULT 30
|
||
31: 00000000 0 SECTION LOCAL DEFAULT 31
|
||
32: 00000000 0 SECTION LOCAL DEFAULT 32
|
||
33: 00000000 0 SECTION LOCAL DEFAULT 33
|
||
34: 00000000 0 FILE LOCAL DEFAULT ABS init.c
|
||
35: 00000000 0 FILE LOCAL DEFAULT ABS initfini.c
|
||
36: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
|
||
37: 080497f8 0 OBJECT LOCAL DEFAULT 19 __CTOR_LIST__
|
||
38: 08049800 0 OBJECT LOCAL DEFAULT 20 __DTOR_LIST__
|
||
39: 08049808 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__
|
||
40: 08048490 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux
|
||
41: 08049924 1 OBJECT LOCAL DEFAULT 26 completed.6110
|
||
42: 08049928 4 OBJECT LOCAL DEFAULT 26 dtor_idx.6112
|
||
43: 080484f0 0 FUNC LOCAL DEFAULT 14 frame_dummy
|
||
44: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
|
||
45: 080497fc 0 OBJECT LOCAL DEFAULT 19 __CTOR_END__
|
||
46: 080487f4 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__
|
||
47: 08049808 0 OBJECT LOCAL DEFAULT 21 __JCR_END__
|
||
48: 08048650 0 FUNC LOCAL DEFAULT 14 __do_global_ctors_aux
|
||
49: 00000000 0 FILE LOCAL DEFAULT ABS initfini.c
|
||
50: 00000000 0 FILE LOCAL DEFAULT ABS color.c
|
||
51: 080497f8 0 NOTYPE LOCAL DEFAULT 19 __init_array_end
|
||
52: 0804980c 0 OBJECT LOCAL DEFAULT 22 _DYNAMIC
|
||
53: 080497f8 0 NOTYPE LOCAL DEFAULT 19 __init_array_start
|
||
54: 080498e0 0 OBJECT LOCAL DEFAULT 24 _GLOBAL_OFFSET_TABLE_
|
||
55: 08048640 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini
|
||
56: 08048642 0 FUNC GLOBAL HIDDEN 14 __i686.get_pc_thunk.bx
|
||
57: 0804990c 0 NOTYPE WEAK DEFAULT 25 data_start
|
||
58: 00000000 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.0
|
||
59: 00000000 0 FUNC GLOBAL DEFAULT UND fflush@@GLIBC_2.0
|
||
60: 08049914 0 NOTYPE GLOBAL DEFAULT ABS _edata
|
||
61: 00000000 0 FUNC GLOBAL DEFAULT UND sleep@@GLIBC_2.0
|
||
62: 0804867c 0 FUNC GLOBAL DEFAULT 15 _fini
|
||
63: 08049804 0 OBJECT GLOBAL HIDDEN 20 __DTOR_END__
|
||
64: 0804990c 0 NOTYPE GLOBAL DEFAULT 25 __data_start
|
||
65: 00000000 0 FUNC GLOBAL DEFAULT UND puts@@GLIBC_2.0
|
||
66: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
|
||
67: 00000000 0 FUNC GLOBAL DEFAULT UND exit@@GLIBC_2.0
|
||
68: 08049910 0 OBJECT GLOBAL HIDDEN 25 __dso_handle
|
||
69: 0804869c 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used
|
||
70: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_
|
||
71: 080485d0 97 FUNC GLOBAL DEFAULT 14 __libc_csu_init
|
||
72: 00000000 0 FUNC GLOBAL DEFAULT UND putchar@@GLIBC_2.0
|
||
73: 0804992c 0 NOTYPE GLOBAL DEFAULT ABS _end
|
||
74: 08048460 0 FUNC GLOBAL DEFAULT 14 _start
|
||
75: 08048698 4 OBJECT GLOBAL DEFAULT 16 _fp_hw
|
||
76: 08049920 4 OBJECT GLOBAL DEFAULT 26 stdout@@GLIBC_2.0
|
||
77: 08049914 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
|
||
78: 08048514 176 FUNC GLOBAL DEFAULT 14 main
|
||
79: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
|
||
80: 08048398 0 FUNC GLOBAL DEFAULT 12 _init
|
||
|
||
Histogram for bucket list length (total of 3 buckets):
|
||
Length Number % of total Coverage
|
||
0 0 ( 0.0%)
|
||
1 0 ( 0.0%) 0.0%
|
||
2 1 ( 33.3%) 20.0%
|
||
3 1 ( 33.3%) 50.0%
|
||
4 0 ( 0.0%) 50.0%
|
||
5 1 ( 33.3%) 100.0%
|
||
|
||
Histogram for `.gnu.hash' bucket list length (total of 2 buckets):
|
||
Length Number % of total Coverage
|
||
0 0 ( 0.0%)
|
||
1 2 (100.0%) 100.0%
|
||
|
||
Version symbols section '.gnu.version' contains 11 entries:
|
||
Addr: 0000000008048312 Offset: 0x000312 Link: 6 (.dynsym)
|
||
000: 0 (*local*) 2 (GLIBC_2.0) 2 (GLIBC_2.0) 2 (GLIBC_2.0)
|
||
004: 2 (GLIBC_2.0) 0 (*local*) 2 (GLIBC_2.0) 2 (GLIBC_2.0)
|
||
008: 2 (GLIBC_2.0) 2 (GLIBC_2.0) 1 (*global*)
|
||
|
||
Version needs section '.gnu.version_r' contains 1 entries:
|
||
Addr: 0x0000000008048328 Offset: 0x000328 Link: 7 (.dynstr)
|
||
000000: Version: 1 File: libc.so.6 Cnt: 1
|
||
0x0010: Name: GLIBC_2.0 Flags: none Version: 2
|
||
|
||
Notes at offset 0x00000148 with length 0x00000020:
|
||
Owner Data size Description
|
||
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
|
||
OS: Linux, ABI: 2.6.32
|
||
|
||
Notes at offset 0x00000168 with length 0x00000024:
|
||
Owner Data size Description
|
||
GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring)
|
||
Build ID: 112a16370d2ef7589b7ba4184a7ebaad4a0e3d77
|