summaryrefslogtreecommitdiffstats
path: root/dexdump
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2018-10-27 21:45:15 +0000
committerDavid Brazdil <dbrazdil@google.com>2018-10-28 20:00:03 +0000
commit20c765f645fa9be77e045463c5064d41211a2815 (patch)
treedcb9dfb6bf5363d1e933589f22339dc999b96703 /dexdump
parentce2a00daa92670a4fc01ef59fdbc3769a846f69c (diff)
downloadart-20c765f645fa9be77e045463c5064d41211a2815.tar.gz
art-20c765f645fa9be77e045463c5064d41211a2815.tar.bz2
art-20c765f645fa9be77e045463c5064d41211a2815.zip
Revert^4: Add dex item for hiddenapi flags
Move hiddenapi access flags to own data section so as to: (a) increase amount of information stored per method/field (b) use encoding which can be supported long-term. The dex item is implemented as: - array of offsets indexed by class def index - streams of uleb-128 encoded flags. Offsets in array point to the beginning of the flags stream for the given class def. Flags are encoded in the same order as fields and methods are encoded in class data. Zero offset means that the class either does not have class data, or all of its flags are zero. The patch updates: (a) libdexfile with data structure declarations and accessor methods, (b) hiddenapi tool to create the new item from hiddenapi lists and insert it into the given dex file, (c) dexlayout to copy the flags into compact dex, (d) dex file verifier to verify the item. It also removes skipping of verification for boot class path dex files as those now pass DexFileVerifier, and removes the need for removing the flags for JVMTI. The size increase is 450 KB. This reverts commit d33d318685ec4a1c9e7995c914c104ab6487513b. Change-Id: Id00e0efb38ee1eab8d7ed5c645a7778b6b94b849 Test: phone boots Test: m test-art
Diffstat (limited to 'dexdump')
-rw-r--r--dexdump/dexdump.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/dexdump/dexdump.cc b/dexdump/dexdump.cc
index 6b2a1b9a70..2b59342158 100644
--- a/dexdump/dexdump.cc
+++ b/dexdump/dexdump.cc
@@ -1208,7 +1208,7 @@ static void dumpCode(const DexFile* pDexFile, u4 idx, u4 flags,
*/
static void dumpMethod(const ClassAccessor::Method& method, int i) {
// Bail for anything private if export only requested.
- const uint32_t flags = method.GetRawAccessFlags();
+ const uint32_t flags = method.GetAccessFlags();
if (gOptions.exportsOnly && (flags & (kAccPublic | kAccProtected)) == 0) {
return;
}
@@ -1319,7 +1319,7 @@ static void dumpMethod(const ClassAccessor::Method& method, int i) {
*/
static void dumpField(const ClassAccessor::Field& field, int i, const u1** data = nullptr) {
// Bail for anything private if export only requested.
- const uint32_t flags = field.GetRawAccessFlags();
+ const uint32_t flags = field.GetAccessFlags();
if (gOptions.exportsOnly && (flags & (kAccPublic | kAccProtected)) == 0) {
return;
}