'libs() -> dict
Return a dictionary mapping the path of each shared library loaded
by the process to the address it is loaded at in the process\' address
space.
If ``/proc/$PID/maps`` for the process cannot be accessed, the output
of ``ldd`` alone is used.  This may give inaccurate results if ASLR
is enabled.'

def libs(self):

    with context.local(log_level='error'):
        ldd = process(['ldd', self.executable]).recvall()
    maps = parse_ldd_output(ldd)
    try:
        maps_raw = open(('/proc/%d/maps' % self.pid)).read()
    except IOError:
        return maps
    for line in maps_raw.splitlines():
        if ('/' not in line):
            continue
        path = line[line.index('/'):]
        path = os.path.realpath(path)
        if (path not in maps):
            maps[path] = 0
    for lib in maps:
        path = os.path.realpath(lib)
        for line in maps_raw.splitlines():
            if line.endswith(path):
                address = line.split('-')[0]
                maps[lib] = int(address, 16)
                break
    return maps
