summaryrefslogtreecommitdiffstats
path: root/source4/scripting/devel/nmfind
blob: 865c0d71acff1fc0de066778b164616f0437a16b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# find object files containing a symbol
# for example:
#   nmfind foo_function $(find bin/default -name '*.o')

TARGET=$1
shift
for f in $*; do
	if nm $f 2>&1 | grep $TARGET >/dev/null; then
		echo [$f]
		nm $f | grep $TARGET
		echo
	fi
done