lzma compressed data if sections GNU_DEBUGDATA size int fd memfd_creat

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// lzma compressed data
if (sections[GNU_DEBUGDATA].size > 0) {
/*int fd = memfd_create(".gnu_debugdata", MFD_CLOEXEC);
if (fd < 0) {
error_callback(data, "Cant perform memfd_create", errno);
goto fail;
}*/
int fd;
int ret;
fd = backtrace_open("/home/sargarass/work/es/lin_monitor/build/debug1", error_callback, data, NULL);
if (fd < 0) {
error_callback(data, "Cant perform memfd_create", errno);
goto fail;
}
ret = elf_add(state, ".gnu_debugdata", fd, base_address, error_callback, data,
fileline_fn, found_sym, found_dwarf, fileline_entry, 0, 1, NULL,
0);
if (ret < 0) {
backtrace_close(fd, error_callback, data);
}
//backtrace_free(state, lzma_decoded_data, lzma_decoded_data_size, error_callback, data);
return ret;
}