diff options
| author | Vladimir Marko <vmarko@google.com> | 2018-01-03 13:14:37 +0000 |
|---|---|---|
| committer | Vladimir Marko <vmarko@google.com> | 2018-03-08 10:40:10 +0000 |
| commit | b066d43b1d9184899aff32b1f243d092611ad9c6 (patch) | |
| tree | 5409177f52b1f1c648297913cb0e0b2808b9048d /compiler/optimizing/code_generator_mips64.h | |
| parent | fe491c7b9cdd64ff4ccc10f6b212cb92a59fc765 (diff) | |
| download | art-b066d43b1d9184899aff32b1f243d092611ad9c6.tar.gz art-b066d43b1d9184899aff32b1f243d092611ad9c6.tar.bz2 art-b066d43b1d9184899aff32b1f243d092611ad9c6.zip | |
Load ArtMethod* from .data.bimg.rel.ro entries.
Introduce a new .data.bimg.rel.ro section in oat files where
we store offsets of boot image objects from the beginning of
the boot image. At runtime we relocate these entries using
the actual boot image address to turn offsets to pointers.
Use the .data.bimg.rel.ro to prepare the boot image methods
used by HInvokeStaticOrDirect for PIC AOT app compilation.
Loading the ArtMethod* from .data.bimg.rel.ro instead of the
.bss avoids the initial call to the resolution trampoline.
Test: Additional test in 522-checker-sharpening
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --pictest --npictest
Test: Pixel 2 XL boots.
Test: testrunner.py --target --optimizing --pictest --npictest
Bug: 71526895
Change-Id: Ie5f5b1f622704877b36730377146e59092e46c0c
Diffstat (limited to 'compiler/optimizing/code_generator_mips64.h')
| -rw-r--r-- | compiler/optimizing/code_generator_mips64.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/code_generator_mips64.h b/compiler/optimizing/code_generator_mips64.h index ddeb3eb90c..9ff3f63384 100644 --- a/compiler/optimizing/code_generator_mips64.h +++ b/compiler/optimizing/code_generator_mips64.h @@ -586,6 +586,8 @@ class CodeGeneratorMIPS64 : public CodeGenerator { DISALLOW_COPY_AND_ASSIGN(PcRelativePatchInfo); }; + PcRelativePatchInfo* NewBootImageRelRoPatch(uint32_t boot_image_offset, + const PcRelativePatchInfo* info_high = nullptr); PcRelativePatchInfo* NewBootImageMethodPatch(MethodReference target_method, const PcRelativePatchInfo* info_high = nullptr); PcRelativePatchInfo* NewMethodBssEntryPatch(MethodReference target_method, @@ -655,7 +657,7 @@ class CodeGeneratorMIPS64 : public CodeGenerator { // Deduplication map for 64-bit literals, used for non-patchable method address or method code // address. Uint64ToLiteralMap uint64_literals_; - // PC-relative method patch info for kBootImageLinkTimePcRelative. + // PC-relative method patch info for kBootImageLinkTimePcRelative/kBootImageRelRo. ArenaDeque<PcRelativePatchInfo> boot_image_method_patches_; // PC-relative method patch info for kBssEntry. ArenaDeque<PcRelativePatchInfo> method_bss_entry_patches_; |
