mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-24 10:52:36 +01:00
19 lines
437 B
Awk
19 lines
437 B
Awk
|
# $FreeBSD$
|
||
|
|
||
|
# 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);
|
||
|
}
|
||
|
}
|