mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +01:00
031beb4e23
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
18 lines
425 B
Awk
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);
|
|
}
|
|
}
|