Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: courgette/testdata/rel32_x64_02.txt

Issue 2008253004: Refactor rel32 searching process for x64 to make it more similar to x86. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve rel32_finder doc Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Test rel32 jump instructions with abs32 and .reloc obstructions. 1 # Test rel32 jump instructions with abs32 and .reloc obstructions.
2 2
3 # .text start RVA and end RVA 3 # .text start RVA and end RVA
4 1000 4 1000
5 3000 5 3000
6 # .reloc start RVA and end RVA 6 # .reloc start RVA and end RVA
7 # Typically this won't overlap with .text. 7 # Typically this won't overlap with .text.
8 # Note: If we use 1020, then the algorithm would never encounter it, so the 8 # Note: If we use 1020, then the algorithm would never encounter it, so the
9 # .reloc does not get skipped! This edge case is not worth fixing right now. 9 # .reloc does not get skipped! This edge case is not worth fixing right now.
10 101F 10 101F
(...skipping 16 matching lines...) Expand all
27 00401031: 0F 86 00 00 00 00 jbe 00401037 27 00401031: 0F 86 00 00 00 00 jbe 00401037
28 00401037: 0F 87 00 00 00 00 ja 0040103D 28 00401037: 0F 87 00 00 00 00 ja 0040103D
29 0040103D: 0F 88 00 00 00 00 js 00401043 29 0040103D: 0F 88 00 00 00 00 js 00401043
30 00401043: 0F 89 00 00 00 00 jns 00401049 30 00401043: 0F 89 00 00 00 00 jns 00401049
31 00401049: 0F 8A 00 00 00 00 jp 0040104F # Ignored! 31 00401049: 0F 8A 00 00 00 00 jp 0040104F # Ignored!
32 0040104F: 0F 8B 00 00 00 00 jnp 00401055 # Ignored! 32 0040104F: 0F 8B 00 00 00 00 jnp 00401055 # Ignored!
33 00401055: 0F 8C 00 00 00 00 jl 0040105B # Overlaps with abs32 33 00401055: 0F 8C 00 00 00 00 jl 0040105B # Overlaps with abs32
34 0040105B: 0F 8D 00 00 00 00 jge 00401061 # Overlaps with abs32 34 0040105B: 0F 8D 00 00 00 00 jge 00401061 # Overlaps with abs32
35 00401061: 0F 8E 00 00 00 00 jle 00401067 35 00401061: 0F 8E 00 00 00 00 jle 00401067
36 00401067: 0F 8F 00 00 00 00 jg 0040106D 36 00401067: 0F 8F 00 00 00 00 jg 0040106D
37 0040106D: 5D pop ebp 37 0040106D: FF 15 00 00 00 00 call 00401073
38 0040106E: C3 ret 38 00401073: FF 25 00 00 00 00 jmp 00401079
39 00401079: 8B 05 00 00 00 00 mov eax, 00401079
huangs 2016/05/30 05:48:35 mov eax, [rip+00000000]
etiennep 2016/05/30 17:07:30 Done.
40 0040107F: 8B 3D 00 00 00 00 mov edi, 00401085
41 00401085: 8D 05 00 00 00 00 lea eax, 00401079
42 0040108B: 8D 3D 00 00 00 00 lea edi, 00401079
43 00401091: 48 8B 05 00 00 00 mov rax, 00401098
44 00
45 00401098: 48 8B 3D 00 00 00 mov rdi, 0040109F
46 00
47 0040109F: 48 8D 05 00 00 00 lea rax, 004010A6
48 00
49 004010A6: 48 8D 3D 00 00 00 lea rdi, 004010AD
50 00
51 004010AD: 4C 8B 05 00 00 00 mov r8, 004010B4
52 00
53 004010B4: 4C 8B 3D 00 00 00 mov r15, 004010BB
54 00
55 004010BB: 4C 8D 05 00 00 00 lea r8, 004010C2
56 00
57 004010C2: 4C 8D 3D 00 00 00 lea r15, 004010C9
58 00
59 004010C9: 5D pop ebp
huangs 2016/05/30 05:48:35 NIT: Aligment.
etiennep 2016/05/30 17:07:30 Done.
60 004010CA: C3 ret
39 61
40 Abs32: 62 Abs32:
41 1004 63 1004
42 1008 64 1008
43 105A # Straddles across two instruction. 65 105A # Straddles across two instruction.
44 105F # Same, but covers the op code (and not the target) of the second. 66 105F # Same, but covers the op code (and not the target) of the second.
45 67
46 Expected: 68 Expected:
47 # 1004 69 # 1004
48 # 1009 70 # 1009
49 100F 71 100F
50 1015 72 1015
51 101B 73 101B
52 # 1021 74 # 1021
53 # 1027 75 # 1027
54 # 102D 76 # 102D
55 1033 77 1033
56 1039 78 1039
57 103F 79 103F
58 1045 80 1045
59 # 1057 81 # 1057
60 # 105D 82 # 105D
61 1063 # Op code 0F 8E overlaps with abs32 105F, but still okay 83 1063
62 1069 84 1069
85 106F
86 1075
87 # 107B Not yet detected.
88 # 1081 Not yet detected.
89 # 1087 Not yet detected.
90 # 108D Not yet detected.
91 1094
92 109B
93 10A2
94 10A9
95 10B0
96 10B7
97 10BE
98 10C5
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698