arm64 module: set plt* section addresses to 0x0
authorShaoying Xu <shaoyi@amazon.com>
Tue, 16 Feb 2021 18:32:34 +0000 (18:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:36 +0000 (11:38 +0100)
commit18b9041e434faea3981ae143d5b4dabf6302e1b5
treec9d467d3e8c61d756736388bb923f0008106bd44
parentd623d5cb383193a7c37ed749b20fda3cfac2889b
arm64 module: set plt* section addresses to 0x0

commit f5c6d0fcf90ce07ee0d686d465b19b247ebd5ed7 upstream.

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 5d8591bc0fba ("module: set ksymtab/kcrctab* section
addresses to 0x0").

Reported-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Shaoying Xu <shaoyi@amazon.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210216183234.GA23876@amazon.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/module.lds.h