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: [email protected] Reviewed-by: Guo Ren <[email protected]> Signed-off-by: Chong Qiao <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent dce5ea1 commit 93eb121

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)