'Return a dictionary of the libraries used by a remote file.'

def _libs_remote(self, remote):

    escaped_remote = sh_string(remote)
    cmd = ''.join(['(', 'ulimit    -s    unlimited;', ('ldd    %s    >    /dev/null    &&' % escaped_remote), '(', ('LD_TRACE_LOADED_OBJECTS=1    %s||' % escaped_remote), ('ldd    %s' % escaped_remote), '))', '    2>/dev/null'])
    (data, status) = self.run_to_end(cmd)
    if (status != 0):
        self.error(('Unable    to    find    libraries    for    %r' % remote))
        return {}
    return misc.parse_ldd_output(data)
