xref: /dflybsd-src/tools/tools/chkldd/chkldd.awk (revision d5d36918ba8270b25193b0e4651b8efe546616a6)
1# helper script to check ldd(1) output for a given library
2# objects detected to be linked with the library are printed
3# usage: ldd <object> ... | awk -v library=<path-to-library>
4
5BEGIN {
6	FS = ":";
7	object = "";
8	library = " => " library " (";
9}
10
11{
12	if ($0 ~ /:$/) {
13		object = $1;
14	} else if (object != "") {
15		if (index($0, library) > 0) {
16			print object;
17			object = "";
18		}
19	}
20}
21