diff options
author | 2018-07-13 10:27:43 +0100 | |
---|---|---|
committer | 2018-07-16 10:12:51 +0100 | |
commit | 8e524ad3c690c183b1a71f6114796974a107c5dd (patch) | |
tree | 6ee124814e8f33fd4706eb15fcad2cae0019546b /compiler/linker/linker_patch.h | |
parent | 5991b184a40e4ce181d67d683ced46caa6143b53 (diff) |
Always produce PIC code for AOT compilation.
Change sharpening to use PIC load kinds for AOT compilation
and add "Jit" to the direct addressing load kind names. Use
PIC code also for the Integer.valueOf() intrinsic codegen.
Remove all support for non-PIC linker patches.
The dex2oat --compile-pic option is retained for now but
ignored by the compiler.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: Pixel 2 XL boots.
Test: testrunner.py --target --optimizing
Bug: 77856493
Change-Id: I54d666f6522f160a1b6ece4045a15d19363acbb6
Diffstat (limited to 'compiler/linker/linker_patch.h')
-rw-r--r-- | compiler/linker/linker_patch.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/compiler/linker/linker_patch.h b/compiler/linker/linker_patch.h index b7beb7bdb4..5e1615fbd2 100644 --- a/compiler/linker/linker_patch.h +++ b/compiler/linker/linker_patch.h @@ -47,7 +47,6 @@ class LinkerPatch { kDataBimgRelRo, kMethodRelative, kMethodBssEntry, - kCall, // TODO: Remove. (Deprecated, non-PIC.) kCallRelative, kTypeRelative, kTypeBssEntry, @@ -94,14 +93,6 @@ class LinkerPatch { return patch; } - static LinkerPatch CodePatch(size_t literal_offset, - const DexFile* target_dex_file, - uint32_t target_method_idx) { - LinkerPatch patch(literal_offset, Type::kCall, target_dex_file); - patch.method_idx_ = target_method_idx; - return patch; - } - static LinkerPatch RelativeCodePatch(size_t literal_offset, const DexFile* target_dex_file, uint32_t target_method_idx) { @@ -170,24 +161,6 @@ class LinkerPatch { return patch_type_; } - bool IsPcRelative() const { - switch (GetType()) { - case Type::kIntrinsicReference: - case Type::kDataBimgRelRo: - case Type::kMethodRelative: - case Type::kMethodBssEntry: - case Type::kCallRelative: - case Type::kTypeRelative: - case Type::kTypeBssEntry: - case Type::kStringRelative: - case Type::kStringBssEntry: - case Type::kBakerReadBarrierBranch: - return true; - default: - return false; - } - } - uint32_t IntrinsicData() const { DCHECK(patch_type_ == Type::kIntrinsicReference); return intrinsic_data_; @@ -201,7 +174,6 @@ class LinkerPatch { MethodReference TargetMethod() const { DCHECK(patch_type_ == Type::kMethodRelative || patch_type_ == Type::kMethodBssEntry || - patch_type_ == Type::kCall || patch_type_ == Type::kCallRelative); return MethodReference(target_dex_file_, method_idx_); } |