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

Unified Diff: courgette/rel32_finder.cc

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, 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.cc
diff --git a/courgette/rel32_finder.cc b/courgette/rel32_finder.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ea5ecaa212614e5bbdcb1531963adc646fb67a5b
--- /dev/null
+++ b/courgette/rel32_finder.cc
@@ -0,0 +1,24 @@
+// Copyright 2016 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.
+
+#include <stdint.h>
+
+#include "courgette/rel32_finder.h"
huangs 2016/05/26 22:11:17 NIT: This should be at top since this is the "main
etiennep 2016/05/27 18:12:33 Done.
+
+namespace courgette {
+
+Rel32Finder::Rel32Finder(RVA relocs_start_rva, RVA relocs_end_rva)
+ : relocs_start_rva_(relocs_start_rva), relocs_end_rva_(relocs_end_rva) {}
+
+void Rel32Finder::SwapRel32Locations(std::vector<RVA>* dest) {
+ dest->swap(rel32_locations_);
+}
+
+#if COURGETTE_HISTOGRAM_TARGETS
+void Rel32FinderX86::SwapRel32TargetRVAs(std::map<RVA, int>* dest) {
+ dest->swap(rel32_target_rvas_);
+}
+#endif
+
+} // namespace courgette

Powered by Google App Engine
This is Rietveld 408576698