+ /* Needed if we find pc relative addresses. */
+ GElf_Addr bias;
+ dwfl_module_getelf (dwflmod, &bias);
Check for errors?
+ /* pcrel for an FDE address really means data relative. */
Two spaces at the end of a sentence. "data-relative".
Or explain better: "relative to the runtime address of the start_address
+ Dwarf_Addr pc_start = initial_location;
+ if ((fde_encoding & 0x70) == DW_EH_PE_pcrel)
+ pc_start += ((uint64_t) shdr->sh_addr
+ + (base - (const unsigned char *) data->d_buf))
+ - bias;
Put it inside the parens so auto-indentation always works.
+ pc_start &= (ptr_size == 4
+ ? UINT64_C (0xffffffff)
+ : UINT64_C (0xffffffffffffffff));
Why is this necessary? It needs a comment.