Skip to content

Commit

Permalink
LoongArch: Fix the _stext symbol address
Browse files Browse the repository at this point in the history
_stext means the start of .text section (see __is_kernel_text()), but we
put its definition in .ref.text by mistake. Fix it by defining it in the
vmlinux.lds.S.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
  • Loading branch information
chenhuacai committed Jun 25, 2022
1 parent 501dcbe commit 92264f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions arch/loongarch/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

__REF

SYM_ENTRY(_stext, SYM_L_GLOBAL, SYM_A_NONE)

SYM_CODE_START(kernel_entry) # kernel entry point

/* Config direct window and set PG */
Expand Down
1 change: 1 addition & 0 deletions arch/loongarch/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ SECTIONS
HEAD_TEXT_SECTION

. = ALIGN(PECOFF_SEGMENT_ALIGN);
_stext = .;
.text : {
TEXT_TEXT
SCHED_TEXT
Expand Down

0 comments on commit 92264f2

Please sign in to comment.