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

Unified 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: Improve rel32_finder doc Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
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..208ec46813fb411a55eecce0435a5f13ca33b002
--- /dev/null
+++ b/courgette/rel32_finder_x86.h
@@ -0,0 +1,33 @@
+// 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 <vector>
+
+#include "courgette/image_utils.h"
+#include "courgette/rel32_finder.h"
+
+namespace courgette {
+
+// This implementation performs naive scan for opcodes having rel32
huangs 2016/05/30 05:48:35 NIT: Unwrap comments.
etiennep 2016/05/30 17:07:30 Done.
+// as arguments, disregarding instruction alignment.
+class Rel32FinderX86 : public Rel32Finder {
+ public:
+ 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,
+ const std::vector<RVA>& abs32_locations) override;
+};
+
+} // namespace courgette
+
+#endif // COURGETTE_REL32_FINDER_X86_H_

Powered by Google App Engine
This is Rietveld 408576698