aboutsummaryrefslogtreecommitdiffstats
diff options
authorPetr Pavlu <petr.pavlu@suse.com>2026-03-27 08:59:00 +0100
committerSami Tolvanen <samitolvanen@google.com>2026-05-26 20:45:59 +0000
commitffe1545ce8a0a7bb698d5f68cbbdef8f93d1fce6 (patch)
tree5e2cbd8f8386601f519b88968f535b48a1ccc864
parente7ae89a0c97ce2b68b0983cd01eda67cf373517d (diff)
downloadlinux-next-history-ffe1545ce8a0a7bb698d5f68cbbdef8f93d1fce6.tar.gz
module, arm: force sh_addr=0 for arch-specific sections
When linking modules with 'ld.bfd -r', sections defined without an address inherit the location counter, resulting in non-zero sh_addr values in the resulting .ko files. Relocatable objects are expected to have sh_addr=0 for all sections. Non-zero addresses are confusing in this context, typically worse compressible, and may cause tools to misbehave [1]. Force sh_addr=0 for all arm-specific module sections. Link: https://sourceware.org/bugzilla/show_bug.cgi?id=33958 [1] Signed-off-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
-rw-r--r--arch/arm/include/asm/module.lds.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/include/asm/module.lds.h b/arch/arm/include/asm/module.lds.h
index 0e7cb4e314b48..f9ad774b2889d 100644
--- a/arch/arm/include/asm/module.lds.h
+++ b/arch/arm/include/asm/module.lds.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CONFIG_ARM_MODULE_PLTS
SECTIONS {
- .plt : { BYTE(0) }
- .init.plt : { BYTE(0) }
+ .plt 0 : { BYTE(0) }
+ .init.plt 0 : { BYTE(0) }
}
#endif