diff options
author | Rong Xu <[email protected]> | 2024-11-26 09:34:09 -0800 |
---|---|---|
committer | Masahiro Yamada <[email protected]> | 2024-11-27 09:36:01 +0900 |
commit | 52892ed6b03a14b961c1df783ed05763758abc73 (patch) | |
tree | f1e991c64bf3586954062960963be39e09e26d73 | |
parent | 18e885099f1c52755f054202525cb60d3edcda44 (diff) |
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 <[email protected]>
Reported-by: Chris Packham <[email protected]>
Closes: https://lore.kernel.org/lkml/[email protected]/T/
Tested-by: Chris Packham <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
-rw-r--r-- | arch/mips/kernel/head.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/vmlinux.lds.S | 1 | ||||
-rw-r--r-- | scripts/head-object-list.txt | 1 |
3 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index b825ed4476c7..e3ff6179c99f 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 9ff55cb80a64..2b708fac8d2c 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -61,6 +61,7 @@ SECTIONS /* read-only */ _text = .; /* Text and read-only data */ .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 |