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