From: "Arnd Bergmann" <arnd@arndb.de>
To: "Josh Poimboeuf" <jpoimboe@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: "relocation to !ENDBR" objtool warnings
Date: Tue, 17 Dec 2024 11:37:54 +0100 [thread overview]
Message-ID: <485d1139-0c09-4d56-b076-e3e0f131b738@app.fastmail.com> (raw)
In-Reply-To: <710349fd-08df-444f-b8c6-86b1249810df@app.fastmail.com>
On Tue, Dec 17, 2024, at 10:09, Arnd Bergmann wrote:
> On Tue, Dec 17, 2024, at 09:54, Arnd Bergmann wrote:
>>
>> 00000000000000f0 <stpcpy>:
>> f0: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1)
>> f7: 00 00 00 00
>> fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
>> 100: f3 0f 1e fa endbr64
>
>
> I had one more look at the assembler file created by gcc and found
> that this is a 16-byte nop:
>
> .align 16
> .globl stpcpy
> .type stpcpy, @function
> stpcpy:
> .p2align 5
> endbr64
...
>
> No idea why it got inserted here, or why it only shows up in these
> two functions. Having a nop before the endbr is a compiler bug, right?
I confirmed that this is only a problem on gcc-14.2, both gcc-14.1
and gcc trunk (15.0 I assume) are fine according to the compiler
explorer: https://godbolt.org/z/9xf7Ph8GT
Arnd
next prev parent reply other threads:[~2024-12-17 10:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 8:54 Arnd Bergmann
2024-12-17 9:09 ` Arnd Bergmann
2024-12-17 10:37 ` Arnd Bergmann [this message]
2024-12-18 8:47 ` Josh Poimboeuf
2024-12-18 10:08 ` Peter Zijlstra
2024-12-18 10:38 ` Arnd Bergmann
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=485d1139-0c09-4d56-b076-e3e0f131b738@app.fastmail.com \
--to=arnd@arndb.de \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.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®