From: Helge Deller <deller@gmx.de>
To: Sami Tolvanen <samitolvanen@google.com>,
Helge Deller <deller@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
Josh Poimboeuf <jpoimboe@kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Aaron Tomlin <atomlin@atomlin.com>,
linux-modules@vger.kernel.org
Subject: Re: [PATCH] module.lds.S: Fix modules on 32-bit parisc architecture
Date: Tue, 7 Apr 2026 22:03:19 +0200 [thread overview]
Message-ID: <78072b59-ccae-4c48-b5fa-74e0d7953375@gmx.de> (raw)
In-Reply-To: <CABCJKucmXyTUxE6fApftqLOTwOgOLu166Gd_K-JeBqAZenou1A@mail.gmail.com>
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
prev parent reply other threads:[~2026-04-07 20:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78072b59-ccae-4c48-b5fa-74e0d7953375@gmx.de \
--to=deller@gmx.de \
--cc=atomlin@atomlin.com \
--cc=da.gomez@kernel.org \
--cc=deller@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox