aboutsummaryrefslogtreecommitdiff
path: root/arch/loongarch
diff options
context:
space:
mode:
authorGravatar Huacai Chen <chenhuacai@loongson.cn> 2023-04-18 19:38:58 +0800
committerGravatar Huacai Chen <chenhuacai@loongson.cn> 2023-04-18 19:38:58 +0800
commit93eb1215ed794a18ba8753e0654f069d58838966 (patch)
tree15a060a016bb59578dd598ffa08b189fd5444000 /arch/loongarch
parentLoongArch: Mark 3 symbol exports as non-GPL (diff)
downloadlinux-93eb1215ed794a18ba8753e0654f069d58838966.tar.gz
linux-93eb1215ed794a18ba8753e0654f069d58838966.tar.bz2
linux-93eb1215ed794a18ba8753e0654f069d58838966.zip
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 5d8591bc0fbaeb6ded ("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>
Diffstat (limited to 'arch/loongarch')
-rw-r--r--arch/loongarch/include/asm/module.lds.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/loongarch/include/asm/module.lds.h b/arch/loongarch/include/asm/module.lds.h
index 438f09d4ccf4..88554f92e010 100644
--- a/arch/loongarch/include/asm/module.lds.h
+++ b/arch/loongarch/include/asm/module.lds.h
@@ -2,8 +2,8 @@
/* Copyright (C) 2020-2022 Loongson Technology Corporation Limited */
SECTIONS {
. = ALIGN(4);
- .got : { BYTE(0) }
- .plt : { BYTE(0) }
- .plt.idx : { BYTE(0) }
- .ftrace_trampoline : { BYTE(0) }
+ .got 0 : { BYTE(0) }
+ .plt 0 : { BYTE(0) }
+ .plt.idx 0 : { BYTE(0) }
+ .ftrace_trampoline 0 : { BYTE(0) }
}