'Get all non-debugging symbol information of debugged ELF file
Returns:
- dictionary of (address(Int), symname(String))'

@memoized
def elfsymbols(self, pattern=None):

    headers = self.elfheader()
    if ('.plt' not in headers):
        return {}
    binmap = self.get_vmmap('binary')
    elfbase = (binmap[0][0] if binmap else 0)
    headers = self.elfheader()
    if ('.dynstr' not in headers):
        return {}
    (start, end, _) = headers['.dynstr']
    mem = self.dumpmem(start, end)
    if ((not mem) and self.getfile()):
        fd = open(self.getfile())
        fd.seek(start, 0)
        mem = fd.read((end - start))
        fd.close()
    dynstrings = [name.decode('utf-8') for name in mem.split('\x00')]
    if pattern:
        dynstrings = [s for s in dynstrings if re.search(pattern, s)]
    symbols = {}
    for symname in dynstrings:
        if (not symname):
            continue
        symname += '@plt'
        out = self.execute_redirect(('info    functions    %s' % symname))
        if (not out):
            continue
        m = re.findall(('.*(0x[^    ]*)\\s*%s' % re.escape(symname)), out)
        for addr in m:
            addr = to_int(addr)
            if self.is_address(addr, binmap):
                if (symname not in symbols):
                    symbols[symname] = addr
                    break
    for (k, v) in symbols.items():
        if (v < elfbase):
            symbols[k] = (v + elfbase)
    return symbols
