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

Side by Side Diff: courgette/rel32_finder_x86.h

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: Rollback to original courgette algorithm and improve unittests 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
(Empty)
1 // Copyright 2015 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_X86_H_
6 #define COURGETTE_REL32_FINDER_X86_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 (this is no longer the "basic" Rel3
etiennep 2016/05/27 18:12:34 Done.
19 // (excluding JPO/JPE) disregarding instruction alignment.
20 class Rel32FinderX86 : public Rel32Finder {
21 public:
22 Rel32FinderX86() = 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 Rel32FinderX86(RVA relocs_start_rva, RVA relocs_end_rva);
24 ~Rel32FinderX86() 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_X86_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698