summaryrefslogtreecommitdiffstats
path: root/oatdump
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2014-10-22 11:37:02 -0700
committerIgor Murashkin <iam@google.com>2014-10-27 20:19:37 -0700
commit46774767fcf7780d1455e755729198648d08742e (patch)
tree09a5d87ff0acbc7eb1fa94ec901ba10009178f03 /oatdump
parent11bd683f6dbebe2f3d02fa383fc9dbc69a83ace8 (diff)
downloadart-46774767fcf7780d1455e755729198648d08742e.tar.gz
art-46774767fcf7780d1455e755729198648d08742e.tar.bz2
art-46774767fcf7780d1455e755729198648d08742e.zip
ART: Add support for patching and loading OAT files compiled with PIC
* Images (.art) compiled with pic now have a new field added. * isDexOptNeeded will now skip patch-ing for apps compiled PIC * First-boot patching now only copies boot.art, boot.oat is linked As a result, all system preopted dex files (with --compile-pic) no longer take up any space in /data/dalvik-cache/<isa>. Bug: 18035729 Change-Id: Ie1acad81a0fd8b2f24e1f3f07a06e6fdb548be62
Diffstat (limited to 'oatdump')
-rw-r--r--oatdump/oatdump.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 2f91f1d824..f5652779d3 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -1273,6 +1273,8 @@ class ImageDumper {
os << "PATCH DELTA:" << image_header_.GetPatchDelta() << "\n\n";
+ os << "COMPILE PIC: " << (image_header_.CompilePic() ? "yes" : "no") << "\n\n";
+
{
os << "ROOTS: " << reinterpret_cast<void*>(image_header_.GetImageRoots()) << "\n";
Indenter indent1_filter(os.rdbuf(), kIndentChar, kIndentBy1Count);
@@ -1323,7 +1325,7 @@ class ImageDumper {
std::string error_msg;
const OatFile* oat_file = class_linker->FindOpenedOatFileFromOatLocation(oat_location);
if (oat_file == nullptr) {
- oat_file = OatFile::Open(oat_location, oat_location, nullptr, false, &error_msg);
+ oat_file = OatFile::Open(oat_location, oat_location, nullptr, nullptr, false, &error_msg);
if (oat_file == nullptr) {
os << "NOT FOUND: " << error_msg << "\n";
return false;
@@ -2087,7 +2089,7 @@ static int DumpOatWithoutRuntime(OatFile* oat_file, OatDumperOptions* options, s
static int DumpOat(Runtime* runtime, const char* oat_filename, OatDumperOptions* options,
std::ostream* os) {
std::string error_msg;
- OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, nullptr, false, &error_msg);
+ OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, nullptr, nullptr, false, &error_msg);
if (oat_file == nullptr) {
fprintf(stderr, "Failed to open oat file from '%s': %s\n", oat_filename, error_msg.c_str());
return EXIT_FAILURE;
@@ -2102,7 +2104,7 @@ static int DumpOat(Runtime* runtime, const char* oat_filename, OatDumperOptions*
static int SymbolizeOat(const char* oat_filename, std::string& output_name) {
std::string error_msg;
- OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, nullptr, false, &error_msg);
+ OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, nullptr, nullptr, false, &error_msg);
if (oat_file == nullptr) {
fprintf(stderr, "Failed to open oat file from '%s': %s\n", oat_filename, error_msg.c_str());
return EXIT_FAILURE;