1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/sys/conf/kmod_syms.awk

28 lines
606 B
Awk
Raw Normal View History

# $FreeBSD$
# Read global symbols from object file.
BEGIN {
while ("${NM:='nm'} -g " ARGV[1] | getline) {
if (match($0, /^[^[:space:]]+ [^AU] (.*)$/)) {
syms[$3] = $2
}
}
}
# De-list symbols from the export list.
2002-03-25 20:32:24 +00:00
{
if (ARGIND == 1)
nextfile
delete syms[$0]
}
# Strip commons, make everything else local.
END {
for (member in syms) {
if (syms[member] == "C")
print "-N" member
else
print "-L" member
}
}