unsigned int symtab_index = 0;
int num_st = 0;
int found_symtab = 0;
+ int is_mapped = 0;
for (cnt = 0; cnt < size; cnt++) {
num_st = 0;
(void *)mmap(0, FUNC_NAME_MAX_LEN,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ is_mapped = 1;
ret = read(file, (void *)info_funcs.dli_sname,
FUNC_NAME_MAX_LEN);
if (ret < 0)
cnt, info_funcs.dli_sname,
(info_funcs.dli_saddr - array[cnt]),
array[cnt], info_funcs.dli_fname, offset_addr);
+ if (is_mapped)
+ munmap((void *)info_funcs.dli_sname, FUNC_NAME_MAX_LEN);
} else {
fprintf_fd(fd, "%2d: (%p) [%s] + %p\n",
cnt, array[cnt], info_funcs.dli_fname, offset_addr);