encounter / objdiff

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

Fix read error on objects with no .text section #67

Closed AetiasHax closed 6 months ago

AetiasHax commented 6 months ago

The DWARF parser errors on object files with no .text sections, which makes it impossible to open objects where the target doesn't contain code yet.

I fixed this for both DWARF 1.1 and 2+, but I don't have a DWARF 1.1 object to test with so I suggest doing so before merging.

encounter commented 6 months ago

Thanks for the fix. I reverted the DWARF 1 changes, since it will hit the outer while condition at last text section, so there's no need to change it.