elf_diff
elf_diff copied to clipboard
Dump structure information from dwarf info
Structure symbol size changes are shown but no way to tell why certain structure size has changed Thanks for this excellent tool! While the assembly diff for functions helps to explain size differences, when it comes to data structures, there's no extra information in the generated report. Users need to look up the structure manually.
Describe the solution you'd like
Display the structure definition, limited to first level(s) in the information view. This can be done with llvm-dwarfdump <elf> --name=<name> -c
The -c
lists the children of the default recursive level. Anyway to extract the hierarchy of a structure from the elf file should work.
@kting28, thank you for sharing your idea.
Unfortunately, the use of llvm-dwarfdump
would add an unwanted dependency to elf_diff. It was written in a way that it only relies on binutils which are available for many platforms. Using LLVM-tools, would mean a severe limitation for some users or at least the burden to install a separate tool.