Skip to content
/ linux Public

Commit be46d2d

Browse files
rxrblnSasha Levin
authored andcommitted
modpost: Amend ppc64 save/restfpr symnames for -Os build
[ Upstream commit 3cd9763 ] Building a size optimized ppc64 kernel (-Os), gcc emits more FP save/restore symbols, that the linker generates on demand into the .sfpr section. Explicitly allow-list those in scripts/mod/modpost.c, too. They are needed for the amdgpu in-kernel floating point support. MODPOST Module.symvers ERROR: modpost: "_restfpr_20" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_restfpr_26" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_restfpr_22" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_savegpr1_27" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_savegpr1_25" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_restfpr_28" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_savegpr1_29" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_savefpr_20" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_savefpr_22" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "_restfpr_15" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! WARNING: modpost: suppressed 56 unresolved symbol warnings because there were too many) Signed-off-by: René Rebe <rene@exactco.de> Link: https://patch.msgid.link/20251123.131330.407910684435629198.rene@exactco.de Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 7c56e66 commit be46d2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/mod/modpost.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,10 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)
608608
/* Special register function linked on all modules during final link of .ko */
609609
if (strstarts(symname, "_restgpr0_") ||
610610
strstarts(symname, "_savegpr0_") ||
611+
strstarts(symname, "_restgpr1_") ||
612+
strstarts(symname, "_savegpr1_") ||
613+
strstarts(symname, "_restfpr_") ||
614+
strstarts(symname, "_savefpr_") ||
611615
strstarts(symname, "_restvr_") ||
612616
strstarts(symname, "_savevr_") ||
613617
strcmp(symname, ".TOC.") == 0)

0 commit comments

Comments
 (0)