parse the output of ldd command