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

Side by Side Diff: courgette/patch_generator_x86_32.h

Issue 8477045: Add Elf 32 Support to Courgette. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove debug printf present by mistake. Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « courgette/ensemble_create.cc ('k') | courgette/types_elf.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This is the transformation and adjustment for Windows X86 executables. 5 // This is the transformation and adjustment for Windows X86 executables.
6 6
7 #ifndef COURGETTE_WIN32_X86_GENERATOR_H_ 7 #ifndef COURGETTE_WIN32_X86_GENERATOR_H_
8 #define COURGETTE_WIN32_X86_GENERATOR_H_ 8 #define COURGETTE_WIN32_X86_GENERATOR_H_
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 12
13 #include "courgette/ensemble.h" 13 #include "courgette/ensemble.h"
14 14
15 namespace courgette { 15 namespace courgette {
16 16
17 class PatchGeneratorX86_32 : public TransformationPatchGenerator { 17 class PatchGeneratorX86_32 : public TransformationPatchGenerator {
18 public: 18 public:
19 PatchGeneratorX86_32(Element* old_element, 19 PatchGeneratorX86_32(Element* old_element,
20 Element* new_element, 20 Element* new_element,
21 PatcherX86_32* patcher, 21 PatcherX86_32* patcher,
22 ExecutableType kind) 22 ExecutableType kind)
23 : TransformationPatchGenerator(old_element, new_element, patcher), 23 : TransformationPatchGenerator(old_element, new_element, patcher),
24 kind_(kind) { 24 kind_(kind) {
25 } 25 }
26 26
27 virtual ExecutableType Kind() { return kind_; } 27 virtual ExecutableType Kind() { return kind_; }
28 28
29 Status WriteInitialParameters(SinkStream* parameter_stream) { 29 Status WriteInitialParameters(SinkStream* parameter_stream) {
30 if (!parameter_stream->WriteSizeVarint32( 30 if (!parameter_stream->WriteSizeVarint32(
31 old_element_->offset_in_ensemble()) || 31 old_element_->offset_in_ensemble()) ||
32 !parameter_stream->WriteSizeVarint32(old_element_->region().length())) { 32 !parameter_stream->WriteSizeVarint32(old_element_->region().length())) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 private: 126 private:
127 virtual ~PatchGeneratorX86_32() { } 127 virtual ~PatchGeneratorX86_32() { }
128 128
129 ExecutableType kind_; 129 ExecutableType kind_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(PatchGeneratorX86_32); 131 DISALLOW_COPY_AND_ASSIGN(PatchGeneratorX86_32);
132 }; 132 };
133 133
134 } // namespace courgette 134 } // namespace courgette
135 #endif // COURGETTE_WIN32_X86_GENERATOR_H_ 135 #endif // COURGETTE_WIN32_X86_GENERATOR_H_
OLDNEW
« no previous file with comments | « courgette/ensemble_create.cc ('k') | courgette/types_elf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698