Skip to content

Commit 93eb121

Browse files
committed
LoongArch: module: set section addresses to 0x0
These got*, plt* and .text.ftrace_trampoline sections specified for LoongArch have non-zero addressses. Non-zero section addresses in a relocatable ELF would confuse GDB when it tries to compute the section offsets and it ends up printing wrong symbol addresses. Therefore, set them to zero, which mirrors the change in commit 5d8591b ("arm64 module: set plt* section addresses to 0x0"). Cc: stable@vger.kernel.org Reviewed-by: Guo Ren <guoren@kernel.org> Signed-off-by: Chong Qiao <qiaochong@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent dce5ea1 commit 93eb121

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

arch/loongarch/include/asm/module.lds.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/* Copyright (C) 2020-2022 Loongson Technology Corporation Limited */
33
SECTIONS {
44
. = ALIGN(4);
5-
.got : { BYTE(0) }
6-
.plt : { BYTE(0) }
7-
.plt.idx : { BYTE(0) }
8-
.ftrace_trampoline : { BYTE(0) }
5+
.got 0 : { BYTE(0) }
6+
.plt 0 : { BYTE(0) }
7+
.plt.idx 0 : { BYTE(0) }
8+
.ftrace_trampoline 0 : { BYTE(0) }
99
}

0 commit comments

Comments
 (0)