[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241126173409.3728585-1-xur@google.com>
Date: Tue, 26 Nov 2024 09:34:09 -0800
From: Rong Xu <xur@...gle.com>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>, Masahiro Yamada <masahiroy@...nel.org>,
Klara Modin <klarasmodin@...il.com>, Rong Xu <xur@...gle.com>,
Christophe Leroy <christophe.leroy@...roup.eu>, Michael Ellerman <mpe@...erman.id.au>,
Nicolas Schier <nicolas@...sle.eu>, Chris Packham <chris.packham@...iedtelesis.co.nz>,
"Maciej W. Rozycki" <macro@...am.me.uk>, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2] [MIPS] Place __kernel_entry at the beginning of text section
Mark __kernel_entry as ".head.text" and place HEAD_TEXT before
TEXT_TEXT in the linker script. This ensures that __kernel_entry
will be placed at the beginning of text section.
Drop mips from scripts/head-object-list.txt.
Signed-off-by: Rong Xu <xur@...gle.com>
Reported-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
Closes: https://lore.kernel.org/lkml/c6719149-8531-4174-824e-a3caf4bc6d0e@alliedtelesis.co.nz/T/
Tested-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
---
arch/mips/kernel/head.S | 1 +
arch/mips/kernel/vmlinux.lds.S | 1 +
scripts/head-object-list.txt | 1 -
3 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index e90695b2b60e..c7528d96dd1a 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -59,6 +59,7 @@
#endif
.endm
+ __HEAD
#ifndef CONFIG_NO_EXCEPT_FILL
/*
* Reserved space for exception handlers.
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index d575f945d422..c9c1ba85ac7b 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -62,6 +62,7 @@ SECTIONS
_text = .; /* Text and read-only data */
_stext = .;
.text : {
+ HEAD_TEXT
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
diff --git a/scripts/head-object-list.txt b/scripts/head-object-list.txt
index fd5d00bac447..f12b4a7b8406 100644
--- a/scripts/head-object-list.txt
+++ b/scripts/head-object-list.txt
@@ -23,7 +23,6 @@ arch/m68k/coldfire/head.o
arch/m68k/kernel/head.o
arch/m68k/kernel/sun3-head.o
arch/microblaze/kernel/head.o
-arch/mips/kernel/head.o
arch/nios2/kernel/head.o
arch/openrisc/kernel/head.o
arch/parisc/kernel/head.o
base-commit: 3596c721c4348b2a964e43f9296a0c01509ba927
--
2.47.0.338.g60cca15819-goog
Powered by blists - more mailing lists