OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COURGETTE_REL32_FINDER_X64_H_ | |
6 #define COURGETTE_REL32_FINDER_X64_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include <map> | |
11 #include <vector> | |
12 | |
13 #include "courgette/image_utils.h" | |
14 #include "courgette/rel32_finder.h" | |
15 | |
16 namespace courgette { | |
17 | |
18 // The basic implementation performs naive scan for rel32 JMP and Jcc opcodes | |
huangs
2016/05/26 22:11:17
Update comment. Should also mention the extra stu
etiennep
2016/05/27 18:12:34
Done.
| |
19 // (excluding JPO/JPE) disregarding instruction alignment. | |
20 class Rel32FinderX64 : public Rel32Finder { | |
21 public: | |
22 Rel32FinderX64() = default; | |
huangs
2016/05/26 22:40:55
Remove default constructor if it turns out we don'
etiennep
2016/05/27 18:12:34
Done.
| |
23 Rel32FinderX64(RVA relocs_start_rva, RVA relocs_end_rva); | |
24 ~Rel32FinderX64() override = default; | |
25 | |
26 void Find(const uint8_t* start_pointer, | |
27 const uint8_t* end_pointer, | |
28 RVA start_rva, | |
29 RVA end_rva, | |
30 uint32_t size_of_image, | |
31 const std::vector<RVA>& abs32_locations) override; | |
32 }; | |
33 | |
34 } // namespace courgette | |
35 | |
36 #endif // COURGETTE_REL32_FINDER_X64_H_ | |
OLD | NEW |