mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
28 lines
597 B
Awk
28 lines
597 B
Awk
# $FreeBSD$
|
|
|
|
# Read global symbols from object file.
|
|
BEGIN {
|
|
while ("nm -g " ARGV[1] | getline) {
|
|
if (match($0, /^[^[:space:]]+ [^AU] (.*)$/)) {
|
|
syms[$3] = $2
|
|
}
|
|
}
|
|
}
|
|
|
|
# De-list symbols from the export list.
|
|
{
|
|
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
|
|
}
|
|
}
|