Load boot image at a random address.

And perform in-place fixup of references and pointers. This
dirties all the boot image memory loaded by zygote, so there
shall be no "shared clean" boot image pages anymore, these
shall change to "shared dirty". However, as we're using a
profile-based boot image, these pages are presumably used
often enough and unlikely to be paged out anyway.

The in-place fixup takes around 60-120ms when starting the
zygote on aosp_taimen-userdebug. However, an experiment with
MAP_POPULATE pushes the raw fixup down to around 12-15ms.
If we used compressed images, this would be the actual time
for fixup as the data would be already present in memory.
If we keep using uncompressed images, we shall need to tune
the loading with MAP_POPULATE or MADV_WILLNEED.

The -Xrelocate/-Xno-relocate option is re-interpreted from
"use patchoat if needed" to "relocate the boot image in
memory if possible". We do not allow relocation for the AOT
compilation to speed up dex2oat execution and help producing
deterministic output.

The patchoat tool shall be removed in a follow-up CL.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --relocate --no-relocate
Test: Pixel 2 XL boots.
Test: m test-art-target-gtest
Test: testrunner.py --target --optimizing --relocate --no-relocate
Bug: 77856493
Change-Id: I2db1fabefb5d4b85c798cd51e04c78cb232bff4a
26 files changed