rewrite core to use readelf instead of ldd. Thanks to falconindy for the hints.
update file regex.