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

Side by Side Diff: courgette/disassembler_win32_x64.h

Issue 1935203002: [Courgette] Using LabelManager to reduce Courgette-apply peak RAM by 25%. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. 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 unified diff | Download patch
« no previous file with comments | « courgette/disassembler_elf_32_x86.cc ('k') | courgette/disassembler_win32_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COURGETTE_DISASSEMBLER_WIN32_X64_H_ 5 #ifndef COURGETTE_DISASSEMBLER_WIN32_X64_H_
6 #define COURGETTE_DISASSEMBLER_WIN32_X64_H_ 6 #define COURGETTE_DISASSEMBLER_WIN32_X64_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Returns Section containing the relative virtual address, or null if none. 47 // Returns Section containing the relative virtual address, or null if none.
48 const Section* RVAToSection(RVA rva) const; 48 const Section* RVAToSection(RVA rva) const;
49 49
50 // (4) -> (5) (see AddressTranslator comment): Returns the RVA of the VA 50 // (4) -> (5) (see AddressTranslator comment): Returns the RVA of the VA
51 // specified by |address|, or kNoRVA if |address| lies outside of the image. 51 // specified by |address|, or kNoRVA if |address| lies outside of the image.
52 RVA Address64ToRVA(uint64_t address) const; 52 RVA Address64ToRVA(uint64_t address) const;
53 53
54 static std::string SectionName(const Section* section); 54 static std::string SectionName(const Section* section);
55 55
56 protected: 56 protected:
57 // Disassembler interfaces.
58 RvaVisitor* CreateAbs32TargetRvaVisitor() override;
59 RvaVisitor* CreateRel32TargetRvaVisitor() override;
60 void RemoveUnusedRel32Locations(AssemblyProgram* program) override;
61
57 CheckBool ParseFile(AssemblyProgram* target) WARN_UNUSED_RESULT; 62 CheckBool ParseFile(AssemblyProgram* target) WARN_UNUSED_RESULT;
58 bool ParseAbs32Relocs(); 63 bool ParseAbs32Relocs();
59 void ParseRel32RelocsFromSections(); 64 void ParseRel32RelocsFromSections();
60 void ParseRel32RelocsFromSection(const Section* section); 65 void ParseRel32RelocsFromSection(const Section* section);
61 66
62 CheckBool ParseNonSectionFileRegion(FileOffset start_file_offset, 67 CheckBool ParseNonSectionFileRegion(FileOffset start_file_offset,
63 FileOffset end_file_offset, 68 FileOffset end_file_offset,
64 AssemblyProgram* program) 69 AssemblyProgram* program)
65 WARN_UNUSED_RESULT; 70 WARN_UNUSED_RESULT;
66 CheckBool ParseFileRegion(const Section* section, 71 CheckBool ParseFileRegion(const Section* section,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 std::map<RVA, int> abs32_target_rvas_; 139 std::map<RVA, int> abs32_target_rvas_;
135 std::map<RVA, int> rel32_target_rvas_; 140 std::map<RVA, int> rel32_target_rvas_;
136 #endif 141 #endif
137 142
138 DISALLOW_COPY_AND_ASSIGN(DisassemblerWin32X64); 143 DISALLOW_COPY_AND_ASSIGN(DisassemblerWin32X64);
139 }; 144 };
140 145
141 } // namespace courgette 146 } // namespace courgette
142 147
143 #endif // COURGETTE_DISASSEMBLER_WIN32_X64_H_ 148 #endif // COURGETTE_DISASSEMBLER_WIN32_X64_H_
OLDNEW
« no previous file with comments | « courgette/disassembler_elf_32_x86.cc ('k') | courgette/disassembler_win32_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698