Skip to content

module: force sh_addr=0 for arch-specific sections

Petr Pavlu linux-arm-kernel linux-m68k linux-modules linux-riscv lkml 1 version Applied

Status from this message: Applied to modules-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4module, arm: force sh_addr=0 for arch-specific sectionsarch/arm/include/asm/module.lds.h+2 -20 repliesApplied
2/4module, arm64: force sh_addr=0 for arch-specific sectionsarch/arm64/include/asm/module.lds.h+2 -20 repliesApplied
3/4module, m68k: force sh_addr=0 for arch-specific sectionsarch/m68k/include/asm/module.lds.h+1 -10 repliesApplied
4/4module, riscv: force sh_addr=0 for arch-specific sectionsarch/riscv/include/asm/module.lds.h+3 -30 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] module: 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].

Joe Lawrence previously addressed the same issue in the main scripts/module.lds.S file [2] and we discussed that the same fix should be also applied to architecture-specific module sections. This series implements these changes.

The series can later be merged through the modules tree, or individual patches can be applied through the architecture-specific trees.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=33958
[2] https://lore.kernel.org/linux-modules/[email protected]/

Petr Pavlu (4):
module, arm: force sh_addr=0 for arch-specific sections module, arm64: force sh_addr=0 for arch-specific sections module, m68k: force sh_addr=0 for arch-specific sections module, riscv: force sh_addr=0 for arch-specific sections

 arch/arm/include/asm/module.lds.h   | 4 ++--
 arch/arm64/include/asm/module.lds.h | 4 ++--
 arch/m68k/include/asm/module.lds.h  | 2 +-
 arch/riscv/include/asm/module.lds.h | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

base-commit: c369299895a591d96745d6492d4888259b004a9e

Signature · 1 line
2.53.0