Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Test rel32 jump instructions with abs32 and .reloc obstructions. | 1 # Test rel32 jump instructions with abs32 and .reloc obstructions. |
| 2 | 2 |
| 3 # Processor type | |
| 4 x86 | |
| 3 # .text start RVA and end RVA | 5 # .text start RVA and end RVA |
| 4 1000 | 6 1000 |
| 5 3000 | 7 3000 |
| 6 # .reloc start RVA and end RVA | 8 # .reloc start RVA and end RVA |
| 7 # Typically this won't overlap with .text. | 9 # Typically this won't overlap with .text. |
| 8 # Note: If we use 1020, then the algorithm would never encounter it, so the | 10 # 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. | 11 # .reloc does not get skipped! This edge case is not worth fixing right now. |
| 10 101F | 12 101F |
| 11 1030 | 13 1030 |
| 12 # End RVA | 14 # End RVA |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 33 00401055: 0F 8C 00 00 00 00 jl 0040105B # Overlaps with abs32 | 35 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 | 36 0040105B: 0F 8D 00 00 00 00 jge 00401061 # Overlaps with abs32 |
| 35 00401061: 0F 8E 00 00 00 00 jle 00401067 | 37 00401061: 0F 8E 00 00 00 00 jle 00401067 |
| 36 00401067: 0F 8F 00 00 00 00 jg 0040106D | 38 00401067: 0F 8F 00 00 00 00 jg 0040106D |
| 37 0040106D: 5D pop ebp | 39 0040106D: 5D pop ebp |
| 38 0040106E: C3 ret | 40 0040106E: C3 ret |
| 39 | 41 |
| 40 Abs32: | 42 Abs32: |
| 41 1004 | 43 1004 |
| 42 1008 | 44 1008 |
| 43 105A # Straddles across two instruction. | 45 105A # Straddles across two instruction. |
|
huangs
2016/05/30 18:14:48
NIT (my bad): "instructions."
etiennep
2016/06/01 17:23:41
Done.
| |
| 44 105F # Same, but covers the op code (and not the target) of the second. | 46 105F # Same, but covers the op code (and not the target) of the second. |
| 45 | 47 |
| 46 Expected: | 48 Expected: |
| 47 # 1004 | 49 # 1004 |
| 48 # 1009 | 50 # 1009 |
| 49 100F | 51 100F |
| 50 1015 | 52 1015 |
| 51 101B | 53 101B |
| 52 # 1021 | 54 # 1021 |
| 53 # 1027 | 55 # 1027 |
| 54 # 102D | 56 # 102D |
| 55 1033 | 57 1033 |
| 56 1039 | 58 1039 |
| 57 103F | 59 103F |
| 58 1045 | 60 1045 |
| 59 # 1057 | 61 # 1057 |
| 60 # 105D | 62 # 105D |
| 61 1063 # Op code 0F 8E overlaps with abs32 105F, but still okay | 63 1063 # Op code 0F 8E overlaps with abs32 105F, but still okay |
| 62 1069 | 64 1069 |
| OLD | NEW |