summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-06-24 17:06:43 +0200
committerWill Deacon <will@kernel.org>2022-06-24 17:18:10 +0100
commitd7bea550279db28cd154fd54843ebc858ffdf0b7 (patch)
treebbfb345ddc377ca5a003cf0b68c966eefc5211c2 /arch/arm64/kernel/vmlinux.lds.S
parentc3cee924bd855184d15bc4aa6088dcf8e2c1394c (diff)
downloadlinux-d7bea550279db28cd154fd54843ebc858ffdf0b7.tar.gz
linux-d7bea550279db28cd154fd54843ebc858ffdf0b7.tar.bz2
linux-d7bea550279db28cd154fd54843ebc858ffdf0b7.zip
arm64: head: use relative references to the RELA and RELR tables
Formerly, we had to access the RELA and RELR tables via the kernel mapping that was being relocated, and so deriving the start and end addresses using ADRP/ADD references was not possible, as the relocation code runs from the ID map. Now that we map the entire kernel image via the ID map, we can simplify this, and just load the entries via the ID map as well. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20220624150651.1358849-14-ardb@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/vmlinux.lds.S')
-rw-r--r--arch/arm64/kernel/vmlinux.lds.S12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index 533673793bc0..20ebdd48db14 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -256,21 +256,17 @@ SECTIONS
HYPERVISOR_RELOC_SECTION
.rela.dyn : ALIGN(8) {
+ __rela_start = .;
*(.rela .rela*)
+ __rela_end = .;
}
- __rela_offset = ABSOLUTE(ADDR(.rela.dyn) - KIMAGE_VADDR);
- __rela_size = SIZEOF(.rela.dyn);
-
-#ifdef CONFIG_RELR
.relr.dyn : ALIGN(8) {
+ __relr_start = .;
*(.relr.dyn)
+ __relr_end = .;
}
- __relr_offset = ABSOLUTE(ADDR(.relr.dyn) - KIMAGE_VADDR);
- __relr_size = SIZEOF(.relr.dyn);
-#endif
-
. = ALIGN(SEGMENT_ALIGN);
__initdata_end = .;
__init_end = .;