ART: Make elf loading not abort
Changes elf_file code to use less CHECKs and instead return error
values (usually nullptr). This avoids aborts.
In oat_file, when loading an oat file fails, try to unlink at. If
this succeeds, on the next run we may compile again.
Bug: 17491333
(cherry picked from commit afa6b8e93a0dc0de33c9d404945c7c5621e20b1a)
Change-Id: I50fdd2edacd86f25d4dacf2180ce2a6105eaf4af
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 0e7da55..be6f097 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -1029,6 +1029,7 @@
include_debug_symbols = true;
} else if (option == "--no-include-debug-symbols" || option == "--strip-symbols") {
include_debug_symbols = false;
+ generate_gdb_information = false; // Depends on debug symbols, see above.
} else if (option.starts_with("--profile-file=")) {
profile_file = option.substr(strlen("--profile-file=")).data();
VLOG(compiler) << "dex2oat: profile file is " << profile_file;