Index: courgette/rel32_finder_x86.h |
diff --git a/courgette/rel32_finder_x86.h b/courgette/rel32_finder_x86.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..40a1a83686e5e192126e2629a5fd1a9e35211fe5 |
--- /dev/null |
+++ b/courgette/rel32_finder_x86.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COURGETTE_REL32_FINDER_X86_H_ |
+#define COURGETTE_REL32_FINDER_X86_H_ |
+ |
+#include <stdint.h> |
+ |
+#include <map> |
+#include <vector> |
+ |
+#include "courgette/image_utils.h" |
+#include "courgette/rel32_finder.h" |
+ |
+namespace courgette { |
+ |
+// 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.
|
+// (excluding JPO/JPE) disregarding instruction alignment. |
+class Rel32FinderX86 : public Rel32Finder { |
+ public: |
+ 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.
|
+ Rel32FinderX86(RVA relocs_start_rva, RVA relocs_end_rva); |
+ ~Rel32FinderX86() override = default; |
+ |
+ void Find(const uint8_t* start_pointer, |
+ const uint8_t* end_pointer, |
+ RVA start_rva, |
+ RVA end_rva, |
+ uint32_t size_of_image, |
+ const std::vector<RVA>& abs32_locations) override; |
+}; |
+ |
+} // namespace courgette |
+ |
+#endif // COURGETTE_REL32_FINDER_X86_H_ |