'Get non-debugging symbol information of debugged ELF file
Args:
- name: target function name (String), special cases:
+ "data": data transfer functions
+ "exec": exec helper functions
Returns:
- if exact name is not provided: dictionary of tuple (symname, plt_entry)
- if exact name is provided: dictionary of tuple (symname, plt_entry, got_entry, reloc_entry)'

@memoized
def elfsymbol(self, symname=None):

    datafuncs = ['printf', 'puts', 'gets', 'cpy']
    execfuncs = ['system', 'exec', 'mprotect', 'mmap', 'syscall']
    result = {}
    if ((not symname) or (symname in ['data', 'exec'])):
        symbols = self.elfsymbols()
    else:
        symbols = self.elfsymbols(symname)
    if (not symname):
        result = symbols
    else:
        sname = (symname.replace('@plt', '') + '@plt')
        if (sname in symbols):
            plt_addr = symbols[sname]
            result[sname] = plt_addr
            out = self.get_disasm(plt_addr, 2)
            for line in out.splitlines():
                if ('jmp' in line):
                    addr = to_int(('0x' + line.strip().rsplit('0x')[(-1)].split()[0]))
                    result[sname.replace('@plt', '@got')] = addr
                if ('push' in line):
                    addr = to_int(('0x' + line.strip().rsplit('0x')[(-1)]))
                    result[sname.replace('@plt', '@reloc')] = addr
        else:
            keywords = [symname]
            if (symname == 'data'):
                keywords = datafuncs
            if (symname == 'exec'):
                keywords = execfuncs
            for (k, v) in symbols.items():
                for f in keywords:
                    if (f in k):
                        result[k] = v
    return result
