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

Unified Diff: courgette/disassembler_win32_x86.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/disassembler_win32_x86.cc
diff --git a/courgette/disassembler_win32_x86.cc b/courgette/disassembler_win32_x86.cc
index eeafd5d4e3b6eb0bd2f4c2e16a37e64371d676c6..0b92f7a50d3de8a248b0e1d6af3b5c4505c20c44 100644
--- a/courgette/disassembler_win32_x86.cc
+++ b/courgette/disassembler_win32_x86.cc
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "courgette/assembly_program.h"
#include "courgette/courgette.h"
-#include "courgette/rel32_finder_win32_x86.h"
+#include "courgette/rel32_finder_x86.h"
#if COURGETTE_HISTOGRAM_TARGETS
#include <iostream>
@@ -50,10 +50,11 @@ void DisassemblerWin32X86::ParseRel32RelocsFromSection(const Section* section) {
RVA start_rva = FileOffsetToRVA(start_file_offset);
RVA end_rva = start_rva + section->virtual_size;
- Rel32FinderWin32X86_Basic finder(
+ Rel32FinderX86 finder(
base_relocation_table().address_,
base_relocation_table().address_ + base_relocation_table().size_);
- finder.Find(start_pointer, end_pointer, start_rva, end_rva, abs32_locations_);
+ finder.Find(start_pointer, end_pointer, start_rva, end_rva, size_of_image_,
+ abs32_locations_);
finder.SwapRel32Locations(&rel32_locations_);
#if COURGETTE_HISTOGRAM_TARGETS

Powered by Google App Engine
This is Rietveld 408576698