From mboxrd@z Thu Jan 1 00:00:00 1970 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 2388A28E5F3; Wed, 4 Jun 2025 11:26:15 +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=1749036376; cv=none; b=Ly2Yz1K2lUeAivZFsmbLA8BI+79Fvc5gcLfk8RYlCtmNGNIRsp2v83ez85BDlxfD+n1j0cQj1t9W8sP6w3Kgn6VQc8y25COvg/K5BKQ+LjOhfPrvJaZD+iO+l++a2dEo3ai03nRddTk3tUkMxeGklWTzmaw+gMQ/osL/pJMIyKo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749036376; c=relaxed/simple; bh=CXvat76UgqTuizaTTXk2cggB6YuXzgU2clBrFmOcy4k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DUgZ6BHBlLsjifl66+JDTyOCpYHXQXNxvnXlV5ERwQ4N12FunAnRDeYjm3JAKi/cFYfV+Esu1YF+dMAK0bf1Y+sVN8OdHa9dmuE0CeuXleWO6I3XGaxrN1EadEVVjlHUsDpNO8tVpw/Humomo6JWKQ+cvmYW/mLQjlRwshdqyhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ljaBft0+; 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="ljaBft0+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 690BDC4CEEF; Wed, 4 Jun 2025 11:26:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749036375; bh=CXvat76UgqTuizaTTXk2cggB6YuXzgU2clBrFmOcy4k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ljaBft0+5o5l8U7L+cwauxQk9qvCh4kVXGRfdGZVA1ROBRHWH5akSlf/ixTX8QSXv F0F1OoO5/8isOq0Vji3evVVauluzAli766s+7nGCrIPEhMKPwNxIzoKzgXhcAqf96y D1JC1ggNgMtL+MfXpNwBYQJhisyJYHiahUnKOGpCh1u7TThRRsu6rvyaV2npiPdeco igDsVATDmDJvF+z8YPw6R69ufXIxFplUOunXsOcL/aXjZauStbdwcPESMF8c1J2Frk 9bLxlCcy9po6Oo2lYXjKorpaLHJmbzRR3l0vWBV8pmWsOPgrpO8FqRWN8pIhJk9FKZ 0U+zWQ0/dOtxQ== Date: Wed, 4 Jun 2025 13:26:09 +0200 From: Alexey Gladkov To: Masahiro Yamada Cc: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Nathan Chancellor , Nicolas Schier , linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH v3 3/6] modpost: Make mod_device_table aliases more unique Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jun 03, 2025 at 01:18:25AM +0900, Masahiro Yamada wrote: > > > > Before these patches this was not a problem as non-unique characters are > > > > in separate object files when the module is compiled separately. > > > > > > > > But when the modules are compiled into the kernel, there is a symbol > > > > conflict when linking vmlinuz. We have modules that export multiple device > > > > tables from different object files. > > > > > > This is because the __mod_device_table__* symbols are global, but > > > I suspect they do not need to be. > > > > > > Let's test this > > > https://lore.kernel.org/lkml/20250602105539.392362-1-masahiroy@kernel.org/T/#u > > > > I tested this patch with the config: > > > > make allmodconfig > > make mod2yesconfig > > > > and it works. > > Good. > Then, __COUNTER__ is unnecessary. I didn't immediately notice. The patch you suggested works, but these symbols remain in System.map and it seems in vmlinuz. -- Rgrds, legion