Skip to content

Commit 0d62b04

Browse files
xur-llvmmasahir0y
authored andcommitted
MIPS: move _stext definition to vmlinux.lds.S
The _stext symbol is intended to reference the start of the text section. However, it currently relies on a fragile link order because the existing EXPORT(_stext) resides within the .text section, which is not guaranteed to be placed first. Move the _stext definition to the linker script to enforce an explicit ordering. Signed-off-by: Rong Xu <[email protected]> Reported-by: Klara Modin <[email protected]> Tested-by: Klara Modin <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 18e8850 commit 0d62b04

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

arch/mips/kernel/head.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
.fill 0x400
6868
#endif
6969

70-
EXPORT(_stext)
71-
7270
#ifdef CONFIG_BOOT_RAW
7371
/*
7472
* Give us a fighting chance of running if execution beings at the

arch/mips/kernel/vmlinux.lds.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ SECTIONS
6060
. = LINKER_LOAD_ADDRESS;
6161
/* read-only */
6262
_text = .; /* Text and read-only data */
63+
_stext = .;
6364
.text : {
6465
TEXT_TEXT
6566
SCHED_TEXT

0 commit comments

Comments
 (0)