diff options
| author | 2023-12-19 11:26:07 +0000 | |
|---|---|---|
| committer | 2023-12-27 18:13:06 +0000 | |
| commit | f45b3e396d1a1b4a19a6253bf6ae9b8a59ebeec5 (patch) | |
| tree | 84ee3822a46174a89d4642decba3ab133d80a163 /libnativeloader/native_loader_api_test.c | |
| parent | b343f663e9b0d63ed4423f6e217d5de34e437440 (diff) | |
Use page size when writing VDEX
Restore the original behaviour - remove rounding up the VDEX mapping
size to kElfSegmentAlignment in the OatWriter: use page size instead.
There was no need in switching to kElfSegmentAlignment in the VDEX
writing logic as there is nothing within VDEX that requires alignment
to page size. The page size value there was used for ensuring parts of
the written VDEX are mapped to memory as expected at the time of
writing to the file, however it didn't have an effect on the file
contents or its size.
This also fixes an issue with the msync call which flushes the VDEX
header. The kElfSegmentAlignment size there isn't always valid as the
extra mapping size could be smaller in case the DEX files being
compiled are not being extracted to the VDEX. This issue wasn't
detected during testing as whether msync would fail in that situation
depended on existence of an unrelated adjacent mapping right
after the VDEX file mapping.
Bug: 316698382
Test: art/tools/run-gtests.sh
Test: art/test/testrunner/testrunner.py --target --64
Test: art/tools/run-libcore-tests.sh --mode=device --variant=X64
Test: art/tools/run-libjdwp-tests.sh --mode=device --variant=X64
Change-Id: Ibb178a60e09f01fc949b03040bea0596140c66ba
Diffstat (limited to 'libnativeloader/native_loader_api_test.c')
0 files changed, 0 insertions, 0 deletions