From nobody Tue Dec 2 02:05:24 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC59732E756 for ; Thu, 20 Nov 2025 20:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763669703; cv=none; b=l1G6YrNpzIlNF6qfxvndjvKtxAEsAagLOXNxnG4hHICZGitLd3nNI9zRZ6D6fId+k5Q5XenFlTc52kBRwSwJTe2ATRvenalNgVJLEXCJXIqzcWUk/qSwAN5b1qLBo+5E+MY69ZLx5H3GeeWVZN4g1ygyBXOT9PkvCLKyZ0EO5N0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763669703; c=relaxed/simple; bh=eh0WMvCd2FDOYh8f9GaU/M6QRLvRAv1R7RhYFfIBsCI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a4/Ixy+jEVQI8FYDkEN+/Mw5USbckbcdTXHp3b9iXHSv5kPPx5xSPg6QmKf3MUqVNEQVKow/UYGUgsQxYgCasGvfIOg/+iqhM8hWOgiMPMv0qsDdO9cW7ctN74e2N95g17AEkJuXYzWe3afAq4gteEkmzztj7e+gSgmJ5wjLCkY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kdGXEdpE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kdGXEdpE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B080C16AAE; Thu, 20 Nov 2025 20:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763669703; bh=eh0WMvCd2FDOYh8f9GaU/M6QRLvRAv1R7RhYFfIBsCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kdGXEdpEkF8ws5bKk5O0C1py8Q4++TsXxwVLCIACDT47wnb/m7uginaHc+XOlba3Q nj6s4rmh1AgYBsVCCbg5yj9PlsvG7snnCwOjfNbjzKn4plFSTOK+328q2Z8A1o2hMw Us8BB9vsi8hQfSqMXS1DC6P9ZD144bUMHAVnwFQ8nksIxhfUUisVBWq4Idocan/56c zWh7dh57k75W/gbp32TBjcNUUVMx8QI2zu2yQjVr4zX1NQ4q7iaf8MoF/V8vDMo/tu iWiBWJRpxnmqhWJltVgMKnWBIWI+4i6ihGuaovGumreFgG+2SeTIRgM1Urli8vq8uA Jlf4IQ0gD0RDQ== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Greg Kroah-Hartman , Jiri Slaby , Mauro Carvalho Chehab , Hans de Goede Subject: [PATCH 2/6] media: atomisp: gc2235: Fix namespace collision and startup() section placement with -ffunction-sections Date: Thu, 20 Nov 2025 12:14:17 -0800 Message-ID: X-Mailer: git-send-email 2.51.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When compiled with -ffunction-sections (e.g., for LTO, livepatch, dead code elimination, AutoFDO, or Propeller), the startup() function gets compiled into the .text.startup section (or in some cases .text.startup.constprop.0 or .text.startup.isra.0). However, the .text.startup and .text.startup.* sections are also used by the compiler for __attribute__((constructor)) code. This naming conflict causes the vmlinux linker script to wrongly place startup() function code in .init.text, which gets freed during boot. Some builds have a mix of objects, both with and without -ffunctions-sections, so it's not possible for the linker script to disambiguate with #ifdef CONFIG_FUNCTION_SECTIONS or similar. This means that "startup" unfortunately needs to be prohibited as a function name. Rename startup() to gc2235_startup(). Signed-off-by: Josh Poimboeuf Reviewed-by: Hans de Goede --- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/s= taging/media/atomisp/i2c/atomisp-gc2235.c index 6fc39ab95e46..6050637a0def 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -491,7 +491,7 @@ static int gc2235_s_power(struct v4l2_subdev *sd, int o= n) return ret; } =20 -static int startup(struct v4l2_subdev *sd) +static int gc2235_startup(struct v4l2_subdev *sd) { struct gc2235_device *dev =3D to_gc2235_sensor(sd); struct i2c_client *client =3D v4l2_get_subdevdata(sd); @@ -556,7 +556,7 @@ static int gc2235_set_fmt(struct v4l2_subdev *sd, return 0; } =20 - ret =3D startup(sd); + ret =3D gc2235_startup(sd); if (ret) { dev_err(&client->dev, "gc2235 startup err\n"); goto err; --=20 2.51.1