Re: [PATCH 0/4] module: force sh_addr=0 for arch-specific sections

Sami Tolvanen <[email protected]>
Newsgroups org.kernel.vger.linux-m68k,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel,org.kernel.vger.linux-modules
Message-ID <[email protected]>
On Fri, 27 Mar 2026 08:58:59 +0100, Petr Pavlu wrote:
> 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.
> 
> [...]

Applied to modules-next, thanks!

[1/4] module, arm: force sh_addr=0 for arch-specific sections
      commit: ffe1545ce8a0a7bb698d5f68cbbdef8f93d1fce6
[2/4] module, arm64: force sh_addr=0 for arch-specific sections
      commit: c5553deb577fe433f770e270fd9582b8325f12d9
[3/4] module, m68k: force sh_addr=0 for arch-specific sections
      commit: 9cb4d4dc82272538de1b7edb6e8cf91597ed00b0
[4/4] module, riscv: force sh_addr=0 for arch-specific sections
      commit: 04e17ca3f77e1722a5db068fbcd7b93c51656013

Best regards,

	Sami
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.