noseglasses / elf_diff

A tool to compare ELF binaries
GNU General Public License v3.0
177 stars 22 forks source link

Dump structure information from dwarf info #114

Open kting28 opened 8 months ago

kting28 commented 8 months ago

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.

noseglasses commented 8 months ago

@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.