decompme / decomp.me

Collaborative decompilation and reverse engineering website
https://decomp.me
MIT License
348 stars 108 forks source link

[BUG] x86 scratches can have errors due to problematic data being included by objdump #1192

Open 1superchip opened 3 months ago

1superchip commented 3 months ago

Some scratches do not work due to extra data objdump emits in its output. The compiler can generate extra functions/data in a .text$x section which is dumped by objdump if "-j .text" isn't passed.

Error shown in the scratch: "Diff error: Error running asm-differ: failed to find address immediate for line 'add %al,(%eax)'" This error is from asm-differ attempting to process incorrect data which is included in the objdump output.

Expected behavior The problematic data should not be included in the objdump output by passing "-j .text".

Scratches https://decomp.me/scratch/x0FQW

Additional context i686-w64-mingw32-objdump dumps .text and .text$x when it is not passed a section to dump with the -j option. objdump does not dump .text$x when passed "-j .text".