arm64: head: use relative references to the RELA and RELR tables
authorArd Biesheuvel <ardb@kernel.org>
Fri, 24 Jun 2022 15:06:43 +0000 (17:06 +0200)
committerWill Deacon <will@kernel.org>
Fri, 24 Jun 2022 16:18:10 +0000 (17:18 +0100)
commitd7bea550279db28cd154fd54843ebc858ffdf0b7
treebbfb345ddc377ca5a003cf0b68c966eefc5211c2
parentc3cee924bd855184d15bc4aa6088dcf8e2c1394c
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>
arch/arm64/kernel/head.S
arch/arm64/kernel/vmlinux.lds.S