OLD | NEW |
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 #ifndef COURGETTE_COURGETTE_H_ | 5 #ifndef COURGETTE_COURGETTE_H_ |
6 #define COURGETTE_COURGETTE_H_ | 6 #define COURGETTE_COURGETTE_H_ |
7 | 7 |
8 #include <stddef.h> // Required to define size_t on GCC | 8 #include <stddef.h> // Required to define size_t on GCC |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // Internal errors. | 41 // Internal errors. |
42 C_STREAM_ERROR = 20, // Unexpected error from streams.h. | 42 C_STREAM_ERROR = 20, // Unexpected error from streams.h. |
43 C_STREAM_NOT_CONSUMED = 21, // Stream has extra data, is expected to be | 43 C_STREAM_NOT_CONSUMED = 21, // Stream has extra data, is expected to be |
44 // used up. | 44 // used up. |
45 C_SERIALIZATION_FAILED = 22, // | 45 C_SERIALIZATION_FAILED = 22, // |
46 C_DESERIALIZATION_FAILED = 23, // | 46 C_DESERIALIZATION_FAILED = 23, // |
47 C_INPUT_NOT_RECOGNIZED = 24, // Unrecognized input (not an executable). | 47 C_INPUT_NOT_RECOGNIZED = 24, // Unrecognized input (not an executable). |
48 C_DISASSEMBLY_FAILED = 25, // | 48 C_DISASSEMBLY_FAILED = 25, // |
49 C_ASSEMBLY_FAILED = 26, // | 49 C_ASSEMBLY_FAILED = 26, // |
50 C_ADJUSTMENT_FAILED = 27, // | 50 C_ADJUSTMENT_FAILED = 27, // |
51 C_TRIM_FAILED = 28, // TrimLabels failed | |
52 }; | 51 }; |
53 | 52 |
54 // What type of executable is something | 53 // What type of executable is something |
55 // This is part of the patch format. Never reuse an id number. | 54 // This is part of the patch format. Never reuse an id number. |
56 enum ExecutableType { | 55 enum ExecutableType { |
57 EXE_UNKNOWN = 0, | 56 EXE_UNKNOWN = 0, |
58 EXE_WIN_32_X86 = 1, | 57 EXE_WIN_32_X86 = 1, |
59 EXE_ELF_32_X86 = 2, | 58 EXE_ELF_32_X86 = 2, |
60 EXE_ELF_32_ARM = 3, | 59 EXE_ELF_32_ARM = 3, |
61 EXE_WIN_32_X64 = 4, | 60 EXE_WIN_32_X64 = 4, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // |buffer| in an undefined state. | 98 // |buffer| in an undefined state. |
100 Status Assemble(EncodedProgram* encoded, SinkStream* buffer); | 99 Status Assemble(EncodedProgram* encoded, SinkStream* buffer); |
101 | 100 |
102 // Adjusts |program| to look more like |model|. | 101 // Adjusts |program| to look more like |model|. |
103 // | 102 // |
104 Status Adjust(const AssemblyProgram& model, AssemblyProgram *program); | 103 Status Adjust(const AssemblyProgram& model, AssemblyProgram *program); |
105 | 104 |
106 } // namespace courgette | 105 } // namespace courgette |
107 | 106 |
108 #endif // COURGETTE_COURGETTE_H_ | 107 #endif // COURGETTE_COURGETTE_H_ |
OLD | NEW |