blob: bb49063a136963e5755d837c56f6afe8f1771935 [file] [log] [blame]
diff --git a/patches/0011-dont-compile-unused-functions.patch b/patches/0011-dont-compile-unused-functions.patch
index bed8b8d..e69de29 100644
--- a/patches/0011-dont-compile-unused-functions.patch
+++ b/patches/0011-dont-compile-unused-functions.patch
@@ -1,98 +0,0 @@
-diff --git a/src/libdexfile/dex/dex_file_layout.cc b/src/libdexfile/dex/dex_file_layout.cc
-index f15e925..fe5e202 100644
---- a/src/libdexfile/dex/dex_file_layout.cc
-+++ b/src/libdexfile/dex/dex_file_layout.cc
-@@ -73,6 +73,7 @@ void DexLayoutSections::MadviseAtLoad(const DexFile* dex_file) const {
- #endif
- }
-
-+#if 0
- std::ostream& operator<<(std::ostream& os, const DexLayoutSection& section) {
- for (size_t i = 0; i < static_cast<size_t>(LayoutType::kLayoutTypeCount); ++i) {
- const DexLayoutSection::Subsection& part = section.parts_[i];
-@@ -88,5 +89,6 @@ std::ostream& operator<<(std::ostream& os, const DexLayoutSections& sections) {
- }
- return os;
- }
-+#endif
-
- } // namespace art
-diff --git a/src/libdexfile/dex/dex_file_loader.cc b/src/libdexfile/dex/dex_file_loader.cc
-index 861f911..d2fe6c1 100644
---- a/src/libdexfile/dex/dex_file_loader.cc
-+++ b/src/libdexfile/dex/dex_file_loader.cc
-@@ -59,6 +59,8 @@ class VectorContainer : public DexFileContainer {
-
- using android::base::StringPrintf;
-
-+#if 0
-+
- class DexZipArchive;
-
- class DexZipEntry {
-@@ -148,6 +150,7 @@ static bool IsZipMagic(uint32_t magic) {
- return (('P' == ((magic >> 0) & 0xff)) &&
- ('K' == ((magic >> 8) & 0xff)));
- }
-+#endif
-
- bool DexFileLoader::IsMagicValid(uint32_t magic) {
- return IsMagicValid(reinterpret_cast<uint8_t*>(&magic));
-@@ -292,6 +295,7 @@ std::unique_ptr<const DexFile> DexFileLoader::OpenWithDataSection(
- /*verify_result=*/ nullptr);
- }
-
-+#if 0
- bool DexFileLoader::OpenAll(
- const uint8_t* base,
- size_t size,
-@@ -337,6 +341,7 @@ bool DexFileLoader::OpenAll(
- *error_msg = StringPrintf("Expected valid zip or dex file");
- return false;
- }
-+#endif
-
- std::unique_ptr<DexFile> DexFileLoader::OpenCommon(const uint8_t* base,
- size_t size,
-@@ -412,6 +417,7 @@ std::unique_ptr<DexFile> DexFileLoader::OpenCommon(const uint8_t* base,
- return dex_file;
- }
-
-+#if 0
- std::unique_ptr<const DexFile> DexFileLoader::OpenOneDexFileFromZip(
- const DexZipArchive& zip_archive,
- const char* entry_name,
-@@ -473,6 +479,7 @@ std::unique_ptr<const DexFile> DexFileLoader::OpenOneDexFileFromZip(
- // seems an excessive number.
- static constexpr size_t kWarnOnManyDexFilesThreshold = 100;
-
-+
- bool DexFileLoader::OpenAllDexFilesFromZip(
- const DexZipArchive& zip_archive,
- const std::string& location,
-@@ -534,4 +541,5 @@ bool DexFileLoader::OpenAllDexFilesFromZip(
- return true;
- }
- }
-+#endif
- } // namespace art
-diff --git a/src/libdexfile/dex/dex_file_loader.h b/src/libdexfile/dex/dex_file_loader.h
-index d6268bc..e6adf9c 100644
---- a/src/libdexfile/dex/dex_file_loader.h
-+++ b/src/libdexfile/dex/dex_file_loader.h
-@@ -161,6 +161,7 @@ class DexFileLoader {
- std::string* error_msg) const;
-
-
-+#if 0
- // Opens all .dex files found in the memory map, guessing the container format based on file
- // extension.
- virtual bool OpenAll(const uint8_t* base,
-@@ -171,6 +172,7 @@ class DexFileLoader {
- DexFileLoaderErrorCode* error_code,
- std::string* error_msg,
- std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
-+#endif
-
- protected:
- enum class VerifyResult { // private
diff --git a/src/libdexfile/dex/dex_file_layout.cc b/src/libdexfile/dex/dex_file_layout.cc
index f15e925..fe5e202 100644
--- a/src/libdexfile/dex/dex_file_layout.cc
+++ b/src/libdexfile/dex/dex_file_layout.cc
@@ -73,6 +73,7 @@ void DexLayoutSections::MadviseAtLoad(const DexFile* dex_file) const {
#endif
}
+#if 0
std::ostream& operator<<(std::ostream& os, const DexLayoutSection& section) {
for (size_t i = 0; i < static_cast<size_t>(LayoutType::kLayoutTypeCount); ++i) {
const DexLayoutSection::Subsection& part = section.parts_[i];
@@ -88,5 +89,6 @@ std::ostream& operator<<(std::ostream& os, const DexLayoutSections& sections) {
}
return os;
}
+#endif
} // namespace art
diff --git a/src/libdexfile/dex/dex_file_loader.cc b/src/libdexfile/dex/dex_file_loader.cc
index 861f911..3071537 100644
--- a/src/libdexfile/dex/dex_file_loader.cc
+++ b/src/libdexfile/dex/dex_file_loader.cc
@@ -23,7 +23,9 @@
#include "dex_file.h"
#include "dex_file_verifier.h"
#include "standard_dex_file.h"
+#if 0
#include "ziparchive/zip_archive.h"
+#endif
namespace art {
@@ -59,6 +61,8 @@ class VectorContainer : public DexFileContainer {
using android::base::StringPrintf;
+#if 0
+
class DexZipArchive;
class DexZipEntry {
@@ -148,6 +152,7 @@ static bool IsZipMagic(uint32_t magic) {
return (('P' == ((magic >> 0) & 0xff)) &&
('K' == ((magic >> 8) & 0xff)));
}
+#endif
bool DexFileLoader::IsMagicValid(uint32_t magic) {
return IsMagicValid(reinterpret_cast<uint8_t*>(&magic));
@@ -292,6 +297,7 @@ std::unique_ptr<const DexFile> DexFileLoader::OpenWithDataSection(
/*verify_result=*/ nullptr);
}
+#if 0
bool DexFileLoader::OpenAll(
const uint8_t* base,
size_t size,
@@ -337,6 +343,7 @@ bool DexFileLoader::OpenAll(
*error_msg = StringPrintf("Expected valid zip or dex file");
return false;
}
+#endif
std::unique_ptr<DexFile> DexFileLoader::OpenCommon(const uint8_t* base,
size_t size,
@@ -412,6 +419,7 @@ std::unique_ptr<DexFile> DexFileLoader::OpenCommon(const uint8_t* base,
return dex_file;
}
+#if 0
std::unique_ptr<const DexFile> DexFileLoader::OpenOneDexFileFromZip(
const DexZipArchive& zip_archive,
const char* entry_name,
@@ -473,6 +481,7 @@ std::unique_ptr<const DexFile> DexFileLoader::OpenOneDexFileFromZip(
// seems an excessive number.
static constexpr size_t kWarnOnManyDexFilesThreshold = 100;
+
bool DexFileLoader::OpenAllDexFilesFromZip(
const DexZipArchive& zip_archive,
const std::string& location,
@@ -534,4 +543,5 @@ bool DexFileLoader::OpenAllDexFilesFromZip(
return true;
}
}
+#endif
} // namespace art
diff --git a/src/libdexfile/dex/dex_file_loader.h b/src/libdexfile/dex/dex_file_loader.h
index d6268bc..e6adf9c 100644
--- a/src/libdexfile/dex/dex_file_loader.h
+++ b/src/libdexfile/dex/dex_file_loader.h
@@ -161,6 +161,7 @@ class DexFileLoader {
std::string* error_msg) const;
+#if 0
// Opens all .dex files found in the memory map, guessing the container format based on file
// extension.
virtual bool OpenAll(const uint8_t* base,
@@ -171,6 +172,7 @@ class DexFileLoader {
DexFileLoaderErrorCode* error_code,
std::string* error_msg,
std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
+#endif
protected:
enum class VerifyResult { // private