Store the instruction set in the oat header, and use it in oatdump.
Change-Id: I5cc4b853c3ebf1efcc1feb14ce05c97ceabe2c3e
diff --git a/src/oat.h b/src/oat.h
index 23e25af..2f3cf9d 100644
--- a/src/oat.h
+++ b/src/oat.h
@@ -19,6 +19,7 @@
#include <vector>
+#include "constants.h"
#include "dex_file.h"
#include "macros.h"
@@ -26,8 +27,8 @@
class PACKED OatHeader {
public:
- OatHeader() {}
- OatHeader(const std::vector<const DexFile*>* dex_files);
+ OatHeader();
+ OatHeader(InstructionSet instruction_set, const std::vector<const DexFile*>* dex_files);
bool IsValid() const;
const char* GetMagic() const;
@@ -35,6 +36,7 @@
void UpdateChecksum(const void* data, size_t length);
uint32_t GetDexFileCount() const;
uint32_t GetExecutableOffset() const;
+ InstructionSet GetInstructionSet() const;
void SetExecutableOffset(uint32_t executable_offset);
private:
@@ -44,6 +46,8 @@
uint8_t magic_[4];
uint8_t version_[4];
uint32_t adler32_checksum_;
+
+ InstructionSet instruction_set_;
uint32_t dex_file_count_;
uint32_t executable_offset_;