From nobody Tue Dec 2 02:32:21 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 7D2583164C3 for ; Wed, 19 Nov 2025 06:28:23 +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=1763533703; cv=none; b=moFmJLOVevc1U0ks2sEU9dFF+rX+E6RlMMW/QNkZ5k9HfEdfRG00MP+1jdkx690E0CYI79IZLf5Hd5CM80YO5pcBtYgbINvfRauWGkLHyITJS44lebRedjb5rgUXyF36BDdRu4YOxDhGLLiDEry52+UytUTBOBYTPMre9QqrGHY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763533703; c=relaxed/simple; bh=mO1TIF2wwEsOXmMV6dgKoS+miZDPp8qvBLkc4iyh5E4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GcjL3dlZIIrFEXMcPmdakaiALsOuiN11Bi3/qsL+a/MSzkaMPyzF1ekgTF73BsgVl7TmmlAARxDu33HhpQatRGEU9FLwK9gTDuy8oSa7iCH2fGb48OoyCjiSefO2L4T7Tk/LP7svALcrKyZTI3VFHoCt2+grwRJJEon3RtKAOgM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fj7ARTc5; 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="Fj7ARTc5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CC1EC116B1; Wed, 19 Nov 2025 06:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763533702; bh=mO1TIF2wwEsOXmMV6dgKoS+miZDPp8qvBLkc4iyh5E4=; h=From:To:Cc:Subject:Date:From; b=Fj7ARTc5Wl5kd52oXyoo5f4m320DhMEcFiNTx0H0IUDOxs6wXShdW4OKuqhKOi99I ZnmPwbPuOWu+oWYgb3nPn33K5X+55MGnlkb/mPSeAbYUKnJ7cI9bSAIMeVUFoNb6aD iV6fZGlfZWxjmbVEnKTch5NAgGWlhLpDKIkDs6vVf/qJWGOotqKj89uAlBqDIo607f BdHHpYQAlWDCkSxaQHiKFZLfgSVxZrXQ2v7Af7wfsxisb40cuRbM5rnDwHESpsBMDj HfTPtFwc6PB31+qjt1ZrRmG+4139CyC/iCWH+7pIOC7cDa4oOtJ7zWYHKfXFvLQ+Sp WvWYUvZ891Uqg== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Greg Kroah-Hartman , Jiri Slaby , kernel test robot Subject: [PATCH] serial: icom: Fix namespace collision and startup() section placement with -ffunction-sections Date: Tue, 18 Nov 2025 22:27:57 -0800 Message-ID: <45630ac97b19b8d3194763fe7f54bb3b498f3728.1763533593.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.51.1 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 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. This naming conflict causes the vmlinux linker script to wrongly place startup() function code in .init.text, which gets freed during boot. Fix that by renaming startup() to icom_startup(). For consistency, also rename its shutdown() counterpart to icom_shutdown(). Fixes: 6568f14cb5ae ("vmlinux.lds: Exclude .text.startup and .text.exit fro= m TEXT_MAIN") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202511151839.A810rWWM-lkp@int= el.com/ Signed-off-by: Josh Poimboeuf --- For tip/objtool/core. drivers/tty/serial/icom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c index 7fb995a8490e..d00903cfa841 100644 --- a/drivers/tty/serial/icom.c +++ b/drivers/tty/serial/icom.c @@ -760,7 +760,7 @@ static void load_code(struct icom_port *icom_port) dma_free_coherent(&dev->dev, 4096, new_page, temp_pci); } =20 -static int startup(struct icom_port *icom_port) +static int icom_startup(struct icom_port *icom_port) { unsigned long temp; unsigned char cable_id, raw_cable_id; @@ -832,7 +832,7 @@ static int startup(struct icom_port *icom_port) return 0; } =20 -static void shutdown(struct icom_port *icom_port) +static void icom_shutdown(struct icom_port *icom_port) { unsigned long temp; unsigned char cmdReg; @@ -1311,7 +1311,7 @@ static int icom_open(struct uart_port *port) int retval; =20 kref_get(&icom_port->adapter->kref); - retval =3D startup(icom_port); + retval =3D icom_startup(icom_port); =20 if (retval) { kref_put(&icom_port->adapter->kref, icom_kref_release); @@ -1333,7 +1333,7 @@ static void icom_close(struct uart_port *port) cmdReg =3D readb(&icom_port->dram->CmdReg); writeb(cmdReg & ~CMD_RCV_ENABLE, &icom_port->dram->CmdReg); =20 - shutdown(icom_port); + icom_shutdown(icom_port); =20 kref_put(&icom_port->adapter->kref, icom_kref_release); } --=20 2.51.1