Commit f5c6d0fc authored by Shaoying Xu's avatar Shaoying Xu Committed by Will Deacon

arm64 module: set plt* section addresses to 0x0

These plt* and .text.ftrace_trampoline sections specified for arm64 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 5d8591bc ("module: set ksymtab/kcrctab* section
addresses to 0x0").
Reported-by: default avatarFrank van der Linden <fllinden@amazon.com>
Signed-off-by: default avatarShaoying Xu <shaoyi@amazon.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210216183234.GA23876@amazon.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 656d1d58
#ifdef CONFIG_ARM64_MODULE_PLTS #ifdef CONFIG_ARM64_MODULE_PLTS
SECTIONS { SECTIONS {
.plt (NOLOAD) : { BYTE(0) } .plt 0 (NOLOAD) : { BYTE(0) }
.init.plt (NOLOAD) : { BYTE(0) } .init.plt 0 (NOLOAD) : { BYTE(0) }
.text.ftrace_trampoline (NOLOAD) : { BYTE(0) } .text.ftrace_trampoline 0 (NOLOAD) : { BYTE(0) }
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment