* [PATCH] module.lds.S: Fix modules on 32-bit parisc architecture
@ 2026-04-04 20:04 Helge Deller
2026-04-07 16:26 ` Sami Tolvanen
0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 2026-04-04 20:04 UTC (permalink / raw)
To: linux-kernel, linux-parisc, Josh Poimboeuf, Luis Chamberlain,
Petr Pavlu, Daniel Gomez, Sami Tolvanen, Aaron Tomlin,
linux-modules
On the 32-bit parisc architecture, we always used the
-ffunction-sections compiler option to tell the compiler to put the
functions into seperate text sections. This is necessary, otherwise
"big" kernel modules like ext4 or ipv6 fail to load because some
branches won't be able to reach their stubs.
Commit 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related
macros") broke this for parisc because all text sections will get
unconditionally merged now.
Fix the issue by avoiding the text section merge for 32-bit parisc while still
allowing it for all other architectures.
Fixes: 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related macros")
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: stable@vger.kernel.org # v6.19+
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/scripts/module.lds.S b/scripts/module.lds.S
index 054ef99e8288..41e13e9cbb9d 100644
--- a/scripts/module.lds.S
+++ b/scripts/module.lds.S
@@ -41,9 +41,11 @@ SECTIONS {
__kcfi_traps : { KEEP(*(.kcfi_traps)) }
#endif
+#if !defined(CONFIG_PARISC) || defined(CONFIG_64BIT)
.text : {
*(.text .text.[0-9a-zA-Z_]*)
}
+#endif
.bss : {
*(.bss .bss.[0-9a-zA-Z_]*)
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] module.lds.S: Fix modules on 32-bit parisc architecture
2026-04-04 20:04 [PATCH] module.lds.S: Fix modules on 32-bit parisc architecture Helge Deller
@ 2026-04-07 16:26 ` Sami Tolvanen
2026-04-07 20:03 ` Helge Deller
0 siblings, 1 reply; 3+ messages in thread
From: Sami Tolvanen @ 2026-04-07 16:26 UTC (permalink / raw)
To: Helge Deller
Cc: linux-kernel, linux-parisc, Josh Poimboeuf, Luis Chamberlain,
Petr Pavlu, Daniel Gomez, Aaron Tomlin, linux-modules
Hi Helge,
On Sat, Apr 4, 2026 at 1:04 PM Helge Deller <deller@kernel.org> wrote:
>
> On the 32-bit parisc architecture, we always used the
> -ffunction-sections compiler option to tell the compiler to put the
> functions into seperate text sections. This is necessary, otherwise
> "big" kernel modules like ext4 or ipv6 fail to load because some
> branches won't be able to reach their stubs.
>
> Commit 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related
> macros") broke this for parisc because all text sections will get
> unconditionally merged now.
>
> Fix the issue by avoiding the text section merge for 32-bit parisc while still
> allowing it for all other architectures.
>
> Fixes: 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related macros")
> Cc: Josh Poimboeuf <jpoimboe@kernel.org>
> Cc: stable@vger.kernel.org # v6.19+
> Signed-off-by: Helge Deller <deller@gmx.de>
>
> diff --git a/scripts/module.lds.S b/scripts/module.lds.S
> index 054ef99e8288..41e13e9cbb9d 100644
> --- a/scripts/module.lds.S
> +++ b/scripts/module.lds.S
> @@ -41,9 +41,11 @@ SECTIONS {
> __kcfi_traps : { KEEP(*(.kcfi_traps)) }
> #endif
>
> +#if !defined(CONFIG_PARISC) || defined(CONFIG_64BIT)
Instead of adding parisc-specific policies to the main module linker
script, could we add a separate config flag for this and have parisc
select that in its own Kconfig for !64BIT? Perhaps something like
ARCH_WANTS_MODULE_TEXT_SECTIONS?
Sami
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] module.lds.S: Fix modules on 32-bit parisc architecture
2026-04-07 16:26 ` Sami Tolvanen
@ 2026-04-07 20:03 ` Helge Deller
0 siblings, 0 replies; 3+ messages in thread
From: Helge Deller @ 2026-04-07 20:03 UTC (permalink / raw)
To: Sami Tolvanen, Helge Deller
Cc: linux-kernel, linux-parisc, Josh Poimboeuf, Luis Chamberlain,
Petr Pavlu, Daniel Gomez, Aaron Tomlin, linux-modules
On 4/7/26 18:26, Sami Tolvanen wrote:
> Hi Helge,
>
> On Sat, Apr 4, 2026 at 1:04 PM Helge Deller <deller@kernel.org> wrote:
>>
>> On the 32-bit parisc architecture, we always used the
>> -ffunction-sections compiler option to tell the compiler to put the
>> functions into seperate text sections. This is necessary, otherwise
>> "big" kernel modules like ext4 or ipv6 fail to load because some
>> branches won't be able to reach their stubs.
>>
>> Commit 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related
>> macros") broke this for parisc because all text sections will get
>> unconditionally merged now.
>>
>> Fix the issue by avoiding the text section merge for 32-bit parisc while still
>> allowing it for all other architectures.
>>
>> Fixes: 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related macros")
>> Cc: Josh Poimboeuf <jpoimboe@kernel.org>
>> Cc: stable@vger.kernel.org # v6.19+
>> Signed-off-by: Helge Deller <deller@gmx.de>
>>
>> diff --git a/scripts/module.lds.S b/scripts/module.lds.S
>> index 054ef99e8288..41e13e9cbb9d 100644
>> --- a/scripts/module.lds.S
>> +++ b/scripts/module.lds.S
>> @@ -41,9 +41,11 @@ SECTIONS {
>> __kcfi_traps : { KEEP(*(.kcfi_traps)) }
>> #endif
>>
>> +#if !defined(CONFIG_PARISC) || defined(CONFIG_64BIT)
>
> Instead of adding parisc-specific policies to the main module linker
> script, could we add a separate config flag for this and have parisc
> select that in its own Kconfig for !64BIT? Perhaps something like
> ARCH_WANTS_MODULE_TEXT_SECTIONS?
Yes, good idea!
I will send a v2 patch.
Helge
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-07 20:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-04 20:04 [PATCH] module.lds.S: Fix modules on 32-bit parisc architecture Helge Deller
2026-04-07 16:26 ` Sami Tolvanen
2026-04-07 20:03 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox