NJUPT-CSAPP/linklab/phase3.txt
2024-06-12 07:36:23 +08:00

229 lines
13 KiB
Text

ELF 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: REL (Relocatable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 1952 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 16
Section header string table index: 15
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .text PROGBITS 0000000000000000 00000040
0000000000000147 0000000000000000 AX 0 0 1
[ 2] .rela.text RELA 0000000000000000 00000408
0000000000000060 0000000000000018 I 13 1 8
[ 3] .data PROGBITS 0000000000000000 00000188
0000000000000010 0000000000000000 WA 0 0 8
[ 4] .rela.data RELA 0000000000000000 00000468
0000000000000030 0000000000000018 I 13 3 8
[ 5] .bss NOBITS 0000000000000000 00000198
0000000000000000 0000000000000000 WA 0 0 1
[ 6] .rodata PROGBITS 0000000000000000 00000198
00000000000000d8 0000000000000000 A 0 0 8
[ 7] .rela.rodata RELA 0000000000000000 00000498
0000000000000270 0000000000000018 I 13 6 8
[ 8] .comment PROGBITS 0000000000000000 00000270
000000000000002c 0000000000000001 MS 0 0 1
[ 9] .note.GNU-stack PROGBITS 0000000000000000 0000029c
0000000000000000 0000000000000000 0 0 1
[10] .note.gnu.pr[...] NOTE 0000000000000000 000002a0
0000000000000020 0000000000000000 A 0 0 8
[11] .eh_frame PROGBITS 0000000000000000 000002c0
0000000000000038 0000000000000000 A 0 0 8
[12] .rela.eh_frame RELA 0000000000000000 00000708
0000000000000018 0000000000000018 I 13 11 8
[13] .symtab SYMTAB 0000000000000000 000002f8
00000000000000d8 0000000000000018 14 4 8
[14] .strtab STRTAB 0000000000000000 000003d0
0000000000000035 0000000000000000 0 0 1
[15] .shstrtab STRTAB 0000000000000000 00000720
000000000000007e 0000000000000000 0 0 1
Key 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),
D (mbind), l (large), p (processor specific)
There are no section groups in this file.
There are no program headers in this file.
There is no dynamic section in this file.
Relocation section '.rela.text' at offset 0x408 contains 4 entries:
Offset Info Type Sym. Value Sym. Name + Addend
00000000005e 00030000000b R_X86_64_32S 0000000000000000 .rodata + 8
000000000112 000600000004 R_X86_64_PLT32 0000000000000000 putchar - 4
00000000012c 000600000004 R_X86_64_PLT32 0000000000000000 putchar - 4
000000000141 000700000004 R_X86_64_PLT32 0000000000000000 __stack_chk_fail - 4
Relocation section '.rela.data' at offset 0x468 contains 2 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000000000 000300000001 R_X86_64_64 0000000000000000 .rodata + 0
000000000008 000500000001 R_X86_64_64 0000000000000000 do_phase + 0
Relocation section '.rela.rodata' at offset 0x498 contains 26 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000000008 000200000001 R_X86_64_64 0000000000000000 .text + 65
000000000010 000200000001 R_X86_64_64 0000000000000000 .text + 6e
000000000018 000200000001 R_X86_64_64 0000000000000000 .text + 77
000000000020 000200000001 R_X86_64_64 0000000000000000 .text + 80
000000000028 000200000001 R_X86_64_64 0000000000000000 .text + 89
000000000030 000200000001 R_X86_64_64 0000000000000000 .text + 8f
000000000038 000200000001 R_X86_64_64 0000000000000000 .text + 95
000000000040 000200000001 R_X86_64_64 0000000000000000 .text + 9b
000000000048 000200000001 R_X86_64_64 0000000000000000 .text + a1
000000000050 000200000001 R_X86_64_64 0000000000000000 .text + a7
000000000058 000200000001 R_X86_64_64 0000000000000000 .text + ad
000000000060 000200000001 R_X86_64_64 0000000000000000 .text + b3
000000000068 000200000001 R_X86_64_64 0000000000000000 .text + b9
000000000070 000200000001 R_X86_64_64 0000000000000000 .text + bf
000000000078 000200000001 R_X86_64_64 0000000000000000 .text + c5
000000000080 000200000001 R_X86_64_64 0000000000000000 .text + cb
000000000088 000200000001 R_X86_64_64 0000000000000000 .text + d1
000000000090 000200000001 R_X86_64_64 0000000000000000 .text + d7
000000000098 000200000001 R_X86_64_64 0000000000000000 .text + dd
0000000000a0 000200000001 R_X86_64_64 0000000000000000 .text + e3
0000000000a8 000200000001 R_X86_64_64 0000000000000000 .text + e9
0000000000b0 000200000001 R_X86_64_64 0000000000000000 .text + ef
0000000000b8 000200000001 R_X86_64_64 0000000000000000 .text + f5
0000000000c0 000200000001 R_X86_64_64 0000000000000000 .text + fb
0000000000c8 000200000001 R_X86_64_64 0000000000000000 .text + 101
0000000000d0 000200000001 R_X86_64_64 0000000000000000 .text + 107
Relocation section '.rela.eh_frame' at offset 0x708 contains 1 entry:
Offset Info Type Sym. Value Sym. Name + Addend
000000000020 000200000002 R_X86_64_PC32 0000000000000000 .text + 0
No processor specific unwind information to decode
Symbol table '.symtab' contains 9 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS phase3.c
2: 0000000000000000 0 SECTION LOCAL DEFAULT 1 .text
3: 0000000000000000 0 SECTION LOCAL DEFAULT 6 .rodata
4: 0000000000000000 8 OBJECT GLOBAL DEFAULT 3 phase_id
5: 0000000000000000 327 FUNC GLOBAL DEFAULT 1 do_phase
6: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND putchar
7: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail
8: 0000000000000008 8 OBJECT GLOBAL DEFAULT 3 phase
No version information found in this file.
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
Properties: x86 feature: IBT, SHSTK
./phase3.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <do_phase>:
0: f3 0f 1e fa endbr64
4: 55 push %rbp
5: 48 89 e5 mov %rsp,%rbp
8: 48 83 ec 20 sub $0x20,%rsp
c: 64 48 8b 04 25 28 00 00 00 mov %fs:0x28,%rax
15: 48 89 45 f8 mov %rax,-0x8(%rbp)
19: 31 c0 xor %eax,%eax
1b: 48 b8 58 55 4e 4a 45 54 49 41 movabs $0x414954454a4e5558,%rax
25: 48 89 45 ee mov %rax,-0x12(%rbp)
29: 66 c7 45 f6 59 00 movw $0x59,-0xa(%rbp)
2f: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
36: /----- e9 df 00 00 00 jmp 11a <do_phase+0x11a>
3b: /--|----> 8b 45 e8 mov -0x18(%rbp),%eax
3e: | | 48 98 cltq
40: | | 0f b6 44 05 ee movzbl -0x12(%rbp,%rax,1),%eax
45: | | 88 45 e7 mov %al,-0x19(%rbp)
48: | | 0f be 45 e7 movsbl -0x19(%rbp),%eax
4c: | | 83 e8 41 sub $0x41,%eax
4f: | | 83 f8 19 cmp $0x19,%eax
52: | | /-- 0f 87 b3 00 00 00 ja 10b <do_phase+0x10b>
58: | | | 89 c0 mov %eax,%eax
5a: | | | 48 8b 04 c5 00 00 00 00 mov 0x0(,%rax,8),%rax 5e: R_X86_64_32S .rodata+0x8
62: | | | 3e ff e0 notrack jmp *%rax
65: | | | c6 45 e7 58 movb $0x58,-0x19(%rbp)
69: | | +-- e9 9d 00 00 00 jmp 10b <do_phase+0x10b>
6e: | | | c6 45 e7 68 movb $0x68,-0x19(%rbp)
72: | | +-- e9 94 00 00 00 jmp 10b <do_phase+0x10b>
77: | | | c6 45 e7 42 movb $0x42,-0x19(%rbp) // B
7b: | | +-- e9 8b 00 00 00 jmp 10b <do_phase+0x10b>
80: | | | c6 45 e7 70 movb $0x70,-0x19(%rbp)
84: | | +-- e9 82 00 00 00 jmp 10b <do_phase+0x10b>
89: | | | c6 45 e7 6d movb $0x6d,-0x19(%rbp)
8d: | | +-- eb 7c jmp 10b <do_phase+0x10b>
8f: | | | c6 45 e7 38 movb $0x38,-0x19(%rbp)
93: | | +-- eb 76 jmp 10b <do_phase+0x10b>
95: | | | c6 45 e7 39 movb $0x39,-0x19(%rbp)
99: | | +-- eb 70 jmp 10b <do_phase+0x10b>
9b: | | | c6 45 e7 33 movb $0x33,-0x19(%rbp) // 3
9f: | | +-- eb 6a jmp 10b <do_phase+0x10b>
a1: | | | c6 45 e7 59 movb $0x59,-0x19(%rbp)
a5: | | +-- eb 64 jmp 10b <do_phase+0x10b>
a7: | | | c6 45 e7 4f movb $0x4f,-0x19(%rbp)
ab: | | +-- eb 5e jmp 10b <do_phase+0x10b>
ad: | | | c6 45 e7 37 movb $0x37,-0x19(%rbp) // 7
b1: | | +-- eb 58 jmp 10b <do_phase+0x10b>
b3: | | | c6 45 e7 3e movb $0x3e,-0x19(%rbp)
b7: | | +-- eb 52 jmp 10b <do_phase+0x10b>
b9: | | | c6 45 e7 3e movb $0x3e,-0x19(%rbp)
bd: | | +-- eb 4c jmp 10b <do_phase+0x10b>
bf: | | | c6 45 e7 31 movb $0x31,-0x19(%rbp)
c3: | | +-- eb 46 jmp 10b <do_phase+0x10b>
c5: | | | c6 45 e7 7a movb $0x7a,-0x19(%rbp)
c9: | | +-- eb 40 jmp 10b <do_phase+0x10b>
cb: | | | c6 45 e7 57 movb $0x57,-0x19(%rbp)
cf: | | +-- eb 3a jmp 10b <do_phase+0x10b>
d1: | | | c6 45 e7 32 movb $0x32,-0x19(%rbp) // 2
d5: | | +-- eb 34 jmp 10b <do_phase+0x10b>
d7: | | | c6 45 e7 51 movb $0x51,-0x19(%rbp)
db: | | +-- eb 2e jmp 10b <do_phase+0x10b>
dd: | | | c6 45 e7 70 movb $0x70,-0x19(%rbp)
e1: | | +-- eb 28 jmp 10b <do_phase+0x10b>
e3: | | | c6 45 e7 30 movb $0x30,-0x19(%rbp) // 0
e7: | | +-- eb 22 jmp 10b <do_phase+0x10b>
e9: | | | c6 45 e7 54 movb $0x54,-0x19(%rbp)
ed: | | +-- eb 1c jmp 10b <do_phase+0x10b>
ef: | | | c6 45 e7 4d movb $0x4d,-0x19(%rbp)
f3: | | +-- eb 16 jmp 10b <do_phase+0x10b>
f5: | | | c6 45 e7 34 movb $0x34,-0x19(%rbp) // 4
f9: | | +-- eb 10 jmp 10b <do_phase+0x10b>
fb: | | | c6 45 e7 40 movb $0x40,-0x19(%rbp)
ff: | | +-- eb 0a jmp 10b <do_phase+0x10b>
101: | | | c6 45 e7 35 movb $0x35,-0x19(%rbp)
105: | | +-- eb 04 jmp 10b <do_phase+0x10b>
107: | | | c6 45 e7 36 movb $0x36,-0x19(%rbp)
10b: | | \-> 0f be 45 e7 movsbl -0x19(%rbp),%eax
10f: | | 89 c7 mov %eax,%edi
111: | | /-- e8 00 00 00 00 call 116 <do_phase+0x116> 112: R_X86_64_PLT32 putchar-0x4
116: | | \-> 83 45 e8 01 addl $0x1,-0x18(%rbp)
11a: | \----> 8b 45 e8 mov -0x18(%rbp),%eax
11d: | 83 f8 08 cmp $0x8,%eax
120: \-------- 0f 86 15 ff ff ff jbe 3b <do_phase+0x3b>
126: bf 0a 00 00 00 mov $0xa,%edi
12b: /-- e8 00 00 00 00 call 130 <do_phase+0x130> 12c: R_X86_64_PLT32 putchar-0x4
130: \-> 90 nop
131: 48 8b 45 f8 mov -0x8(%rbp),%rax
135: 64 48 2b 04 25 28 00 00 00 sub %fs:0x28,%rax
13e: /-- 74 05 je 145 <do_phase+0x145>
140: +-- e8 00 00 00 00 call 145 <do_phase+0x145> 141: R_X86_64_PLT32 __stack_chk_fail-0x4
145: \-> c9 leave
146: c3 ret