Re: [PATCH] nios2: ksyms: Declare __mulsi3 export
From: Dinh Nguyen
Date: Mon Oct 19 2026 - 14:09:47 EST
On 10/19/26 06:16, Arnd Bergmann wrote:
On Mon, Oct 19, 2026, at 11:49, Thomas Weißschuh wrote:Patch applied!
GCC may emit libcalls to __mulsi3(). As modpost is not aware that this
function is provided through the linked in libgcc, it fails:
ERROR: modpost: kernel/locking/test-ww_mutex.ko: symbol '__mulsi3' undefined!
ERROR: modpost: kernel/time/test_udelay.ko: symbol '__mulsi3' undefined!
ERROR: modpost: kernel/resource_kunit.ko: symbol '__mulsi3' undefined!
ERROR: modpost: fs/fuse/virtiofs.ko: symbol '__mulsi3' undefined!
etc.
Make sure modpost can see the symbol from libgcc.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes:
https://lore.kernel.org/oe-kbuild-all/202610171933.J4bFOfL8-lkp@xxxxxxxxx/
Fixes: 2fc8483fdcde ("nios2: Build infrastructure")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
The patch looks correct to me, but it would also be nice to not use
libgcc at all. What I see is that only arc, nios2, openrisc and
parisc still link against the toolchain-provided libgcc, everything
else uses the kernel's own runtime.
It's probably not even that hard to do right, here is what I found
is imported from libgcc.
Thanks for the suggestion Arnd, I'll work to on the NIOS2.
Dinh