diff options
author | 2025-03-11 14:39:13 +0000 | |
---|---|---|
committer | 2025-03-11 11:10:41 -0700 | |
commit | 11a5d95861c061ca65ecbf28597e2176a5448c8b (patch) | |
tree | 62bfec0b42538cc36c78ed806e6f0d70532311eb /test/1963-add-to-dex-classloader-in-memory/run.py | |
parent | ca2362c05e2fc05f9211e39ecb74857195b27780 (diff) |
Fix --oat-location for mainline boot image extension.
dex2oat uses the basename of the oat location to determine the soname of
the oat file in the ELF header.
- If the output is specified by "--oat-file", dex2oat takes the oat
location from "--oat-file" and uses it as is.
- If the output is specified by "--oat-fd", dex2oat takes the oat
location from "--oat-location", and for boot image extensions, dex2oat
expends the oat location with the name of the first input dex file.
For the mainline boot image extension specifically, before this change,
odrefresh passes
"--oat-location=/data/misc/.../boot-framework-adservices.oat", so
dex2oat expends it to
"boot-framework-adservices-framework-adservices.oat".
This is unexpected, and it causes a discrepancy between odrefresh and
Cloud Compilation. Cloud Compilation is typically performed on host,
with the output specified by "--oat-file", so the soname of the mainline
boot image extension is "boot-framework-adservices.oat". This
discrepancy causes all the offsets in the oat file to differ.
After this change, odrefresh passes
"--oat-location=/data/misc/.../boot.oat", so the soname after expansion
is "boot-framework-adservices.oat", which is correct.
Bug: 372868052
Test: Generate a mainline boot image extension on host. See the checksum
being identical to the one on device.
Change-Id: I9bfd165a9505e889c3da7d4bc408f9a4f2e52714
Diffstat (limited to 'test/1963-add-to-dex-classloader-in-memory/run.py')
0 files changed, 0 insertions, 0 deletions