* objtool error "mlxfw_firmware_flash.cold(): STT_FUNC at end of section"
@ 2026-11-13 9:48 Arnd Bergmann
0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2026-11-13 9:48 UTC (permalink / raw)
To: Josh Poimboeuf, Peter Zijlstra; +Cc: mlxsw, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]
I keep running into an objtool build failure in the mellanox
firmware driver on x86 randconfig builds with gcc-16.2:
drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.o: error: objtool: mlxfw_firmware_flash.cold(): STT_FUNC at end of section
This looks like an empty function that is not referenced from anywhere,
which points to a mistake in the compiler rather than objtool or the
driver:
.section .text.unlikely
.type mlxfw_firmware_flash.cold, @function
mlxfw_firmware_flash.cold:
.L84:
.text
.size mlxfw_firmware_flash, .-mlxfw_firmware_flash
.section .text.unlikely
.size mlxfw_firmware_flash.cold, .-mlxfw_firmware_flash.cold
The only thing I can tell about the function being unusual is that
the successful return path has a pr_info() in it that causes this
to be the "cold" section while the error return is not cold.
If I add another printk() into the error case, the objtool error
turns into a warning in some but not all configurations:
drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.o: warning: objtool: mlxfw_firmware_flash(): unexpected end of section .text.unlikely
In this case, the same function is not empty but still not referenced:
Disassembly of section .text.unlikely:
0000000000000000 <mlxfw_firmware_flash.cold>:
0: 4c 89 6d e8 mov %r13,-0x18(%rbp)
4: 4c 89 75 f0 mov %r14,-0x10(%rbp)
I've attached the .config and the object file I got for both cases.
Arnd
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 61171 bytes --]
[-- Attachment #3: mlxfw_fsm.o.gz --]
[-- Type: application/gzip, Size: 6716 bytes --]
[-- Attachment #4: mlxfw_fsm-patched.o.gz --]
[-- Type: application/gzip, Size: 6867 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-13 9:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 9:48 objtool error "mlxfw_firmware_flash.cold(): STT_FUNC at end of section" Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®