mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Josh Poimboeuf" <jpoimboe@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>
Cc: mlxsw@nvidia.com, linux-kernel@vger.kernel.org
Subject: objtool error "mlxfw_firmware_flash.cold(): STT_FUNC at end of section"
Date: Fri, 13 Nov 2026 10:48:38 +0100	[thread overview]
Message-ID: <97b2212f-2368-4a8e-92ee-d2f486ccbfbb@app.fastmail.com> (raw)

[-- 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 --]

                 reply	other threads:[~2026-11-13  9:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=97b2212f-2368-4a8e-92ee-d2f486ccbfbb@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=peterz@infradead.org \
    /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

all inboxes | Powered by JetHome®