kmod_syms.awk: fix removal of the export list from the symbol table
Print some warning when export is requested for non-existing symbol. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32878
This commit is contained in:
parent
a7e4eb1422
commit
0d7a6199b6
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user