mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	live-patching@vger.kernel.org, Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-toolchains@vger.kernel.org
Subject: Re: [PATCH 2/4] media: atomisp: Fix startup() section placement with -ffunction-sections
Date: Fri, 14 Nov 2025 09:56:57 +0100	[thread overview]
Message-ID: <20251114085657.GR278048@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <bf8cd823a3f11f64cc82167913be5013c72afa57.1762991150.git.jpoimboe@kernel.org>

On Wed, Nov 12, 2025 at 03:47:49PM -0800, Josh Poimboeuf wrote:
> When compiling the kernel with -ffunction-sections (e.g., for LTO,
> livepatch, dead code elimination, AutoFDO, or Propeller), the startup()
> function gets compiled into the .text.startup section.  In some cases it
> can even be cloned into .text.startup.constprop.0 or
> .text.startup.isra.0.
> 
> However, the .text.startup and .text.startup.* section names are already
> reserved for use by the compiler for __attribute__((constructor)) code.
> 

Urgh, that's a 'fun' one. Is this not a -ffunction-sections bug? I mean,
the compiler should never put regular non-reserved user symbols in a
section it has reserved for itself, right?

  parent reply	other threads:[~2025-11-14  8:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 23:47 [PATCH 0/4] objtool: Fix some -ffunction-sections edge cases Josh Poimboeuf
2025-11-12 23:47 ` [PATCH 1/4] vmlinux.lds: Fix TEXT_MAIN to include .text.start and friends Josh Poimboeuf
2025-11-13  7:08   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2025-11-12 23:47 ` [PATCH 2/4] media: atomisp: Fix startup() section placement with -ffunction-sections Josh Poimboeuf
2025-11-13  7:08   ` [tip: objtool/core] media: atomisp: Fix namespace collision and " tip-bot2 for Josh Poimboeuf
2025-11-14  8:56   ` Peter Zijlstra [this message]
2025-11-14 20:43     ` [PATCH 2/4] media: atomisp: Fix " Josh Poimboeuf
2025-11-18  8:57       ` Peter Zijlstra
2025-11-12 23:47 ` [PATCH 3/4] drivers/xen/xenbus: Fix split() section placement with AutoFDO Josh Poimboeuf
2025-11-13  7:08   ` [tip: objtool/core] drivers/xen/xenbus: Fix namespace collision and " tip-bot2 for Josh Poimboeuf
2025-11-12 23:47 ` [PATCH 4/4] objtool: Warn on functions with ambiguous -ffunction-sections section names Josh Poimboeuf
2025-11-13  7:08   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf

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=20251114085657.GR278048@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=hansg@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-toolchains@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mchehab@kernel.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

Powered by JetHome