encounter / objdiff

A local diffing tool for decompilation projects
Apache License 2.0
125 stars 21 forks source link

.text sections without symbols can not be compared #87

Closed OndrikB closed 3 months ago

OndrikB commented 4 months ago

Some compilers (such as mwcc 2.3 for x86) generate certain code snippets (such as static variable definitions) as a .text segment without a symbol. (see picture below) obrázok Since the segment lacks a symbol to click on, it can not be compared.

Finding a similar section between base and target to compare could be difficult, especially if more than one of these sections exist (though I have not seen any object files where that is the case) - perhaps the closest match in terms of size?

Edit: I did end up finding objects with multiple unnamed .text segments. It would probably be better to simply match up the .text segments according to their order in the object file if they don't have symbols at all or if their symbols don't match on the other side.