Skip to content

Commit 942299b

Browse files
xur-llvmmasahir0y
authored andcommitted
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]> Suggested-by: Chris Packham <[email protected]> Tested-by: Chris Packham <[email protected]> [[email protected]: Move __HEAD below .macro definitions] Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 18e8850 commit 942299b

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

arch/mips/kernel/head.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
#endif
6060
.endm
6161

62+
__HEAD
63+
6264
#ifndef CONFIG_NO_EXCEPT_FILL
6365
/*
6466
* Reserved space for exception handlers.

arch/mips/kernel/vmlinux.lds.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ SECTIONS
6161
/* read-only */
6262
_text = .; /* Text and read-only data */
6363
.text : {
64+
HEAD_TEXT
6465
TEXT_TEXT
6566
SCHED_TEXT
6667
LOCK_TEXT

scripts/head-object-list.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ arch/m68k/coldfire/head.o
2323
arch/m68k/kernel/head.o
2424
arch/m68k/kernel/sun3-head.o
2525
arch/microblaze/kernel/head.o
26-
arch/mips/kernel/head.o
2726
arch/nios2/kernel/head.o
2827
arch/openrisc/kernel/head.o
2928
arch/parisc/kernel/head.o

0 commit comments

Comments
 (0)