I am working on fixing:
There are a couple issues with compressed debug section support
1.libdw doesn't handle compressed debug sections with relocations.
check_section tries to handle compressed debug sections. But
It is too late since relocations have been applied already.
2. Dwarf debug section name handling is duplicated in both libdw
and libebl. ebl_debugscn_p is used to check for debug section.
But it doesn't handle compressed debug section wgile libdw does.
libelf doesn't handle DWARF debug sections and I am not if it
should handle them directly. However, there is convert_data in
libelf, which seems to be an ideal place to handle compressed
debug sections. We just need to add a hook to libelf to allow
libdw to decompress debug sections. I propose to add
__libelf_elf_begin (int fildes, Elf_Cmd cmd, Elf *ref,
char *(*convert_debug_data) (Elf_Scn *,
to libelf. It will be a private function for libdw. The full patch is at
I am not on this mailing list. Please CC me on this topic.
known-dwarf.h is an extremely handy header file. I regularly find
myself replicating it in my ELF/DWARF-related projects. In dwgrep
I simply copy over known-dwarf.awk as such and generate the header
Obviously that's not ideal. Could known-dwarf.h be shipped? In
dwlocstat I really only use it to convert constants to strings
representing their names, but in dwgrep I actually need known-dwarf.h,
as I do some more intricate per-constant processing.