1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00
freebsd/sys/conf/kmod_syms_prefix.awk
Warner Losh 031beb4e23 sys: Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:58 -06:00

18 lines
425 B
Awk

# Read global symbols from object file.
BEGIN {
while ("${NM:='nm'} " ARGV[1] | getline) {
if (match($0, /^[^[:space:]]+ [^AU] (.*)$/)) {
syms[$3] = $2
}
}
delete ARGV[1]
}
# Strip commons, make everything else local.
END {
for (member in syms) {
printf("--redefine-sym=%s=%s%s\n", member, prefix, member);
}
}