From nobody Thu Nov 25 01:09:41 2021 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1F24218B5B9C; Thu, 25 Nov 2021 01:09:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J00CT20N6z4wPv; Thu, 25 Nov 2021 01:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F31D141DB; Thu, 25 Nov 2021 01:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AP19fgp017103; Thu, 25 Nov 2021 01:09:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP19f5W017102; Thu, 25 Nov 2021 01:09:41 GMT (envelope-from git) Date: Thu, 25 Nov 2021 01:09:41 GMT Message-Id: <202111250109.1AP19f5W017102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b0f2ca434842 - stable/13 - kmod_syms.awk: fix removal of the export list from the symbol table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b0f2ca434842cdb7cdd9c55e183dca8fd5a864c5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637802581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4uR2UPMsuYuskbJwNPpQ5FY00deyGx1y9+bw7Gjv5HI=; b=XPPzEXJdnyC/PVujHNz+z49MlSSPCj6avz6jYrrkf6VsEYBPVFpS9dbua6JeU8yz7Ukhdk Rf7sj7kTvHHdJRGjOylBfBlaw0ai/9rdGMsaJK89QKezd/tj9f4p2guwLY04U2n2h0oikj JEZ6rDUsm9aOOYyvbF6Ph4mnm7dRWh/JsbrhvSNq/42ZRTeITn/DkfII+elAl5SoUsjNZj uFEJ0+mLACE+FETjD8CaO2pIfioXcmzkL6yD/+0yCQFm71Vom+Oc/P/o83e4kapdQ+P9sy Er4OMUgFk7khpLFjE9Kbg8Ydv4dFMr8e/qALD1RpIp9l6EdCTKAAXGm1FGkFTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637802581; a=rsa-sha256; cv=none; b=pFEy9O7Sk0+O36Rsq3mduzXgk1b8xNbvGnkNseZvqZTAY4Lg2gwlvNu0NEVr9QSc4329UK 4YxRQlHn2V9vseLhTUWT85MTQ6AHxQgcetDFKrl+TE7f5gCvN2ahgwqM778t+4RQpT+4dk TUIi9qoAeFWpvYcXBzHPGlFbXUm/Qz4oxlMOFFx+mPC1WlDlEKDaLUt6PvKUmgBNEftcJe 1Ulv/a2ijwcThCAU9nMW/Qhua+At/mHJRwzpqvaQnWlQBKDE8Zbv/WOFB4iXRPKAJvRERd xEESCAYwtFerbL4yLoN39dkhPlpE7hT+e6LzVduprOS9tQen4jgwdb2Jjq32Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b0f2ca434842cdb7cdd9c55e183dca8fd5a864c5 commit b0f2ca434842cdb7cdd9c55e183dca8fd5a864c5 Author: Konstantin Belousov AuthorDate: 2021-11-07 09:00:07 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-25 01:09:21 +0000 kmod_syms.awk: fix removal of the export list from the symbol table (cherry picked from commit 0d7a6199b61d55caf0a682ef072bdd107472ab49) --- sys/conf/kmod_syms.awk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/conf/kmod_syms.awk b/sys/conf/kmod_syms.awk index 677d813507ee..8691d2e0b989 100644 --- a/sys/conf/kmod_syms.awk +++ b/sys/conf/kmod_syms.awk @@ -2,6 +2,7 @@ # Read global symbols from object file. BEGIN { + modname = ARGV[1] while ("${NM:='nm'} -g " ARGV[1] | getline) { if (match($0, /^[^[:space:]]+ [^AU] (.*)$/)) { syms[$3] = $2 @@ -12,7 +13,12 @@ BEGIN { # De-list symbols from the export list. { - delete syms[$0] + smbl = $0 + if (!(smbl in syms)) { + printf "Symbol %s is not present in %s\n", \ + smbl, modname > "/dev/stderr" + } + delete syms[smbl] } # Strip commons, make everything else local.