[PATCH 1/4] arm64: relocate: Let __relocate_new_kernel_start align on SZ_4K

Pingfan Liu piliu at redhat.com
Thu Mar 28 04:56:51 PDT 2024


For upcoming C implement, let this section align on SZ_4K, so that
it makes potential instruction pairs 'adrp, add' work.

Signed-off-by: Pingfan Liu <piliu at redhat.com>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Will Deacon <will at kernel.org>
Cc: Ard Biesheuvel <ardb at kernel.org>
Cc: Kees Cook <keescook at chromium.org>
Cc: Mark Rutland <mark.rutland at arm.com>
Cc: Pasha Tatashin <pasha.tatashin at soleen.com>
To: linux-arm-kernel at lists.infradead.org
---
 arch/arm64/kernel/vmlinux.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index 3cd7e76cc562..51eb382ab3a4 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -103,7 +103,7 @@ jiffies = jiffies_64;
 
 #ifdef CONFIG_KEXEC_CORE
 #define KEXEC_TEXT					\
-	ALIGN_FUNCTION();				\
+	. = ALIGN(SZ_4K);				\
 	__relocate_new_kernel_start = .;		\
 	*(.kexec_relocate.text)				\
 	__relocate_new_kernel_end = .;
-- 
2.41.0




More information about the linux-arm-kernel mailing list