summaryrefslogtreecommitdiffstats
path: root/dex2oat/dex2oat.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-04-03 17:50:24 -0700
committerAndreas Gampe <agampe@google.com>2014-04-04 22:06:33 +0000
commit91268c1afd6c0d4fad55b7c86d907233d4660205 (patch)
tree618c0488c3ced26275e7117a6c8dddedcbc835a1 /dex2oat/dex2oat.cc
parente5893f8fb70c58fe9950c1fc8b1023e32ca34637 (diff)
downloadart-91268c1afd6c0d4fad55b7c86d907233d4660205.zip
art-91268c1afd6c0d4fad55b7c86d907233d4660205.tar.gz
art-91268c1afd6c0d4fad55b7c86d907233d4660205.tar.bz2
Check the machine type of an ELF file when loading.
This ensures that we reject wrong target ELF files, and should result in a recompile for the right target. Change-Id: I898dddc4f2bb9b1607a7436083d0ba7619b6007b
Diffstat (limited to 'dex2oat/dex2oat.cc')
-rw-r--r--dex2oat/dex2oat.cc14
1 files changed, 1 insertions, 13 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index f665f5c..c6e448e 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -743,19 +743,7 @@ static int dex2oat(int argc, char** argv) {
InstructionSetFeatures instruction_set_features =
ParseFeatureList(Runtime::GetDefaultInstructionSetFeatures());
-#if defined(__arm__)
- InstructionSet instruction_set = kThumb2;
-#elif defined(__aarch64__)
- InstructionSet instruction_set = kArm64;
-#elif defined(__i386__)
- InstructionSet instruction_set = kX86;
-#elif defined(__x86_64__)
- InstructionSet instruction_set = kX86_64;
-#elif defined(__mips__)
- InstructionSet instruction_set = kMips;
-#else
- InstructionSet instruction_set = kNone;
-#endif
+ InstructionSet instruction_set = kRuntimeISA;
// Profile file to use
std::string profile_file;