Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Nov 2021 01:09:41 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: b0f2ca434842 - stable/13 - kmod_syms.awk: fix removal of the export list from the symbol table
Message-ID:  <202111250109.1AP19f5W017102@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=b0f2ca434842cdb7cdd9c55e183dca8fd5a864c5

commit b0f2ca434842cdb7cdd9c55e183dca8fd5a864c5
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-11-07 09:00:07 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111250109.1AP19f5W017102>