summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-04-15 14:04:38 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2024-04-16 09:25:42 +0000
commit253075f929835d5b86b62840459e1b4f63e31aa1 (patch)
tree48048755bb4459ef55e29b4b6d41176e9a79d0ae /compiler
parent3293b63fd384bbe7e9c143e8b80761345d507536 (diff)
Rename `.data.bimg.rel.ro` to `.data.img.rel.ro`.
Prepare for adding app image patches to the same section. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 38313278 Change-Id: Ib552f005b3a2859152d0de9fa6b2fcd48a0f3feb
Diffstat (limited to 'compiler')
-rw-r--r--compiler/linker/linker_patch.h16
-rw-r--r--compiler/optimizing/code_generator.h6
-rw-r--r--compiler/optimizing/code_generator_arm64.cc6
-rw-r--r--compiler/optimizing/code_generator_arm64.h2
-rw-r--r--compiler/optimizing/code_generator_arm_vixl.cc2
-rw-r--r--compiler/optimizing/code_generator_arm_vixl.h6
-rw-r--r--compiler/optimizing/code_generator_riscv64.cc2
-rw-r--r--compiler/optimizing/code_generator_riscv64.h2
-rw-r--r--compiler/optimizing/code_generator_x86.cc2
-rw-r--r--compiler/optimizing/code_generator_x86_64.cc2
-rw-r--r--compiler/optimizing/nodes.h6
-rw-r--r--compiler/optimizing/pc_relative_fixups_x86.cc4
-rw-r--r--compiler/optimizing/sharpening.cc2
13 files changed, 29 insertions, 29 deletions
diff --git a/compiler/linker/linker_patch.h b/compiler/linker/linker_patch.h
index 133088240b..6e09ea8954 100644
--- a/compiler/linker/linker_patch.h
+++ b/compiler/linker/linker_patch.h
@@ -45,7 +45,7 @@ class LinkerPatch {
// Note: Actual patching is instruction_set-dependent.
enum class Type : uint8_t {
kIntrinsicReference, // Boot image reference for an intrinsic, see IntrinsicObjects.
- kDataBimgRelRo,
+ kBootImageRelRo,
kMethodRelative,
kMethodBssEntry,
kJniEntrypointRelative,
@@ -70,10 +70,10 @@ class LinkerPatch {
return patch;
}
- static LinkerPatch DataBimgRelRoPatch(size_t literal_offset,
- uint32_t pc_insn_offset,
- uint32_t boot_image_offset) {
- LinkerPatch patch(literal_offset, Type::kDataBimgRelRo, /* target_dex_file= */ nullptr);
+ static LinkerPatch BootImageRelRoPatch(size_t literal_offset,
+ uint32_t pc_insn_offset,
+ uint32_t boot_image_offset) {
+ LinkerPatch patch(literal_offset, Type::kBootImageRelRo, /* target_dex_file= */ nullptr);
patch.boot_image_offset_ = boot_image_offset;
patch.pc_insn_offset_ = pc_insn_offset;
return patch;
@@ -224,7 +224,7 @@ class LinkerPatch {
}
uint32_t BootImageOffset() const {
- DCHECK(patch_type_ == Type::kDataBimgRelRo);
+ DCHECK(patch_type_ == Type::kBootImageRelRo);
return boot_image_offset_;
}
@@ -276,7 +276,7 @@ class LinkerPatch {
uint32_t PcInsnOffset() const {
DCHECK(patch_type_ == Type::kIntrinsicReference ||
- patch_type_ == Type::kDataBimgRelRo ||
+ patch_type_ == Type::kBootImageRelRo ||
patch_type_ == Type::kMethodRelative ||
patch_type_ == Type::kMethodBssEntry ||
patch_type_ == Type::kJniEntrypointRelative ||
@@ -322,7 +322,7 @@ class LinkerPatch {
Type patch_type_ : 8;
union {
uint32_t cmp1_; // Used for relational operators.
- uint32_t boot_image_offset_; // Data to write to the .data.bimg.rel.ro entry.
+ uint32_t boot_image_offset_; // Data to write to the boot image .data.img.rel.ro entry.
uint32_t method_idx_; // Method index for Call/Method patches.
uint32_t type_idx_; // Type index for Type patches.
uint32_t string_idx_; // String index for String patches.
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index 94831cab9f..4a6a229098 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -735,15 +735,15 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> {
protected:
// Patch info used for recording locations of required linker patches and their targets,
// i.e. target method, string, type or code identified by their dex file and index,
- // or .data.bimg.rel.ro entries identified by the boot image offset.
+ // or boot image .data.img.rel.ro entries identified by the boot image offset.
template <typename LabelType>
struct PatchInfo {
PatchInfo(const DexFile* dex_file, uint32_t off_or_idx)
: target_dex_file(dex_file), offset_or_index(off_or_idx), label() { }
- // Target dex file or null for .data.bmig.rel.ro patches.
+ // Target dex file or null for boot image .data.img.rel.ro patches.
const DexFile* target_dex_file;
- // Either the boot image offset (to write to .data.bmig.rel.ro) or string/type/method index.
+ // Either the boot image offset (to write to .data.img.rel.ro) or string/type/method index.
uint32_t offset_or_index;
// Label for the instruction to patch.
LabelType label;
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc
index f3cd87b588..4b4cafe378 100644
--- a/compiler/optimizing/code_generator_arm64.cc
+++ b/compiler/optimizing/code_generator_arm64.cc
@@ -5226,10 +5226,10 @@ void CodeGeneratorARM64::EmitLdrOffsetPlaceholder(vixl::aarch64::Label* fixup_la
void CodeGeneratorARM64::LoadBootImageRelRoEntry(vixl::aarch64::Register reg,
uint32_t boot_image_offset) {
DCHECK(reg.IsW());
- // Add ADRP with its PC-relative .data.bimg.rel.ro patch.
+ // Add ADRP with its PC-relative boot image .data.img.rel.ro patch.
vixl::aarch64::Label* adrp_label = NewBootImageRelRoPatch(boot_image_offset);
EmitAdrpPlaceholder(adrp_label, reg.X());
- // Add LDR with its PC-relative .data.bimg.rel.ro patch.
+ // Add LDR with its PC-relative boot image .data.img.rel.ro patch.
vixl::aarch64::Label* ldr_label = NewBootImageRelRoPatch(boot_image_offset, adrp_label);
EmitLdrOffsetPlaceholder(ldr_label, reg.W(), reg.X());
}
@@ -5346,7 +5346,7 @@ void CodeGeneratorARM64::EmitLinkerPatches(ArenaVector<linker::LinkerPatch>* lin
EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::IntrinsicReferencePatch>>(
boot_image_other_patches_, linker_patches);
} else {
- EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::DataBimgRelRoPatch>>(
+ EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::BootImageRelRoPatch>>(
boot_image_other_patches_, linker_patches);
}
EmitPcRelativeLinkerPatches<linker::LinkerPatch::MethodBssEntryPatch>(
diff --git a/compiler/optimizing/code_generator_arm64.h b/compiler/optimizing/code_generator_arm64.h
index d10fb3018b..32a69a9df7 100644
--- a/compiler/optimizing/code_generator_arm64.h
+++ b/compiler/optimizing/code_generator_arm64.h
@@ -1099,7 +1099,7 @@ class CodeGeneratorARM64 : public CodeGenerator {
/*out*/ std::string* debug_name);
// The PcRelativePatchInfo is used for PC-relative addressing of methods/strings/types,
- // whether through .data.bimg.rel.ro, .bss, or directly in the boot image.
+ // whether through .data.img.rel.ro, .bss, or directly in the boot image.
struct PcRelativePatchInfo : PatchInfo<vixl::aarch64::Label> {
PcRelativePatchInfo(const DexFile* dex_file, uint32_t off_or_idx)
: PatchInfo<vixl::aarch64::Label>(dex_file, off_or_idx), pc_insn_label() { }
diff --git a/compiler/optimizing/code_generator_arm_vixl.cc b/compiler/optimizing/code_generator_arm_vixl.cc
index ebbf2f322d..14687bbe14 100644
--- a/compiler/optimizing/code_generator_arm_vixl.cc
+++ b/compiler/optimizing/code_generator_arm_vixl.cc
@@ -9853,7 +9853,7 @@ void CodeGeneratorARMVIXL::EmitLinkerPatches(ArenaVector<linker::LinkerPatch>* l
EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::IntrinsicReferencePatch>>(
boot_image_other_patches_, linker_patches);
} else {
- EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::DataBimgRelRoPatch>>(
+ EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::BootImageRelRoPatch>>(
boot_image_other_patches_, linker_patches);
}
EmitPcRelativeLinkerPatches<linker::LinkerPatch::MethodBssEntryPatch>(
diff --git a/compiler/optimizing/code_generator_arm_vixl.h b/compiler/optimizing/code_generator_arm_vixl.h
index a6cc07d212..a62097d08f 100644
--- a/compiler/optimizing/code_generator_arm_vixl.h
+++ b/compiler/optimizing/code_generator_arm_vixl.h
@@ -684,7 +684,7 @@ class CodeGeneratorARMVIXL : public CodeGenerator {
void MoveFromReturnRegister(Location trg, DataType::Type type) override;
// The PcRelativePatchInfo is used for PC-relative addressing of methods/strings/types,
- // whether through .data.bimg.rel.ro, .bss, or directly in the boot image.
+ // whether through .data.img.rel.ro, .bss, or directly in the boot image.
//
// The PC-relative address is loaded with three instructions,
// MOVW+MOVT to load the offset to base_reg and then ADD base_reg, PC. The offset
@@ -695,9 +695,9 @@ class CodeGeneratorARMVIXL : public CodeGenerator {
PcRelativePatchInfo(const DexFile* dex_file, uint32_t off_or_idx)
: target_dex_file(dex_file), offset_or_index(off_or_idx) { }
- // Target dex file or null for .data.bmig.rel.ro patches.
+ // Target dex file or null for boot image .data.img.rel.ro patches.
const DexFile* target_dex_file;
- // Either the boot image offset (to write to .data.bmig.rel.ro) or string/type/method index.
+ // Either the boot image offset (to write to .data.img.rel.ro) or string/type/method index.
uint32_t offset_or_index;
vixl::aarch32::Label movw_label;
vixl::aarch32::Label movt_label;
diff --git a/compiler/optimizing/code_generator_riscv64.cc b/compiler/optimizing/code_generator_riscv64.cc
index 4a96623cda..5a237ca785 100644
--- a/compiler/optimizing/code_generator_riscv64.cc
+++ b/compiler/optimizing/code_generator_riscv64.cc
@@ -6621,7 +6621,7 @@ void CodeGeneratorRISCV64::EmitLinkerPatches(ArenaVector<linker::LinkerPatch>* l
EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::IntrinsicReferencePatch>>(
boot_image_other_patches_, linker_patches);
} else {
- EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::DataBimgRelRoPatch>>(
+ EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::BootImageRelRoPatch>>(
boot_image_other_patches_, linker_patches);
}
EmitPcRelativeLinkerPatches<linker::LinkerPatch::MethodBssEntryPatch>(
diff --git a/compiler/optimizing/code_generator_riscv64.h b/compiler/optimizing/code_generator_riscv64.h
index b86b30e889..c49e2b4771 100644
--- a/compiler/optimizing/code_generator_riscv64.h
+++ b/compiler/optimizing/code_generator_riscv64.h
@@ -544,7 +544,7 @@ class CodeGeneratorRISCV64 : public CodeGenerator {
const HInvokeStaticOrDirect::DispatchInfo& desired_dispatch_info, ArtMethod* method) override;
// The PcRelativePatchInfo is used for PC-relative addressing of methods/strings/types,
- // whether through .data.bimg.rel.ro, .bss, or directly in the boot image.
+ // whether through .data.img.rel.ro, .bss, or directly in the boot image.
//
// The 20-bit and 12-bit parts of the 32-bit PC-relative offset are patched separately,
// necessitating two patches/infos. There can be more than two patches/infos if the
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc
index e45719bfb9..098356ce00 100644
--- a/compiler/optimizing/code_generator_x86.cc
+++ b/compiler/optimizing/code_generator_x86.cc
@@ -5868,7 +5868,7 @@ void CodeGeneratorX86::EmitLinkerPatches(ArenaVector<linker::LinkerPatch>* linke
EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::IntrinsicReferencePatch>>(
boot_image_other_patches_, linker_patches);
} else {
- EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::DataBimgRelRoPatch>>(
+ EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::BootImageRelRoPatch>>(
boot_image_other_patches_, linker_patches);
}
EmitPcRelativeLinkerPatches<linker::LinkerPatch::MethodBssEntryPatch>(
diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc
index 94ec6accff..a03ce0a9b2 100644
--- a/compiler/optimizing/code_generator_x86_64.cc
+++ b/compiler/optimizing/code_generator_x86_64.cc
@@ -1473,7 +1473,7 @@ void CodeGeneratorX86_64::EmitLinkerPatches(ArenaVector<linker::LinkerPatch>* li
EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::IntrinsicReferencePatch>>(
boot_image_other_patches_, linker_patches);
} else {
- EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::DataBimgRelRoPatch>>(
+ EmitPcRelativeLinkerPatches<NoDexFileAdapter<linker::LinkerPatch::BootImageRelRoPatch>>(
boot_image_other_patches_, linker_patches);
}
EmitPcRelativeLinkerPatches<linker::LinkerPatch::MethodBssEntryPatch>(
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 37d17478ff..6a5213c932 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -4703,7 +4703,7 @@ enum class MethodLoadKind {
// Used for boot image methods referenced by boot image code.
kBootImageLinkTimePcRelative,
- // Load from an entry in the .data.bimg.rel.ro using a PC-relative load.
+ // Load from a boot image entry in the .data.img.rel.ro using a PC-relative load.
// Used for app->boot calls with relocatable image.
kBootImageRelRo,
@@ -6739,7 +6739,7 @@ class HLoadClass final : public HInstruction {
// Used for boot image classes referenced by boot image code.
kBootImageLinkTimePcRelative,
- // Load from an entry in the .data.bimg.rel.ro using a PC-relative load.
+ // Load from a boot image entry in the .data.img.rel.ro using a PC-relative load.
// Used for boot image classes referenced by apps in AOT-compiled code.
kBootImageRelRo,
@@ -6994,7 +6994,7 @@ class HLoadString final : public HInstruction {
// Used for boot image strings referenced by boot image code.
kBootImageLinkTimePcRelative,
- // Load from an entry in the .data.bimg.rel.ro using a PC-relative load.
+ // Load from a boot image entry in the .data.img.rel.ro using a PC-relative load.
// Used for boot image strings referenced by apps in AOT-compiled code.
kBootImageRelRo,
diff --git a/compiler/optimizing/pc_relative_fixups_x86.cc b/compiler/optimizing/pc_relative_fixups_x86.cc
index c2d5ec7b60..cfb3a0bf5d 100644
--- a/compiler/optimizing/pc_relative_fixups_x86.cc
+++ b/compiler/optimizing/pc_relative_fixups_x86.cc
@@ -196,7 +196,7 @@ class PCRelativeHandlerVisitor final : public HGraphVisitor {
HInvokeStaticOrDirect* invoke_static_or_direct = invoke->AsInvokeStaticOrDirectOrNull();
// If this is an invoke-static/-direct with PC-relative addressing (within boot image
- // or using .bss or .data.bimg.rel.ro), we need the PC-relative address base.
+ // or using .bss or .data.img.rel.ro), we need the PC-relative address base.
bool base_added = false;
if (invoke_static_or_direct != nullptr &&
invoke_static_or_direct->HasPcRelativeMethodLoadKind() &&
@@ -240,7 +240,7 @@ class PCRelativeHandlerVisitor final : public HGraphVisitor {
case Intrinsics::kCharacterValueOf:
case Intrinsics::kIntegerValueOf:
// This intrinsic can be call free if it loads the address of the boot image object.
- // If we're compiling PIC, we need the address base for loading from .data.bimg.rel.ro.
+ // If we're compiling PIC, we need the address base for loading from .data.img.rel.ro.
if (!codegen_->GetCompilerOptions().GetCompilePic()) {
break;
}
diff --git a/compiler/optimizing/sharpening.cc b/compiler/optimizing/sharpening.cc
index a6f86ff496..63929089ca 100644
--- a/compiler/optimizing/sharpening.cc
+++ b/compiler/optimizing/sharpening.cc
@@ -127,7 +127,7 @@ HInvokeStaticOrDirect::DispatchInfo HSharpening::SharpenLoadMethod(
code_ptr_location = CodePtrLocation::kCallArtMethod;
}
} else if (IsInBootImage(callee)) {
- // Use PC-relative access to the .data.bimg.rel.ro methods array.
+ // Use PC-relative access to the .data.img.rel.ro boot image methods array.
method_load_kind = MethodLoadKind::kBootImageRelRo;
code_ptr_location = CodePtrLocation::kCallArtMethod;
} else if (!has_method_id) {