decomp.me icon indicating copy to clipboard operation
decomp.me copied to clipboard

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

Open 1superchip opened this issue 1 year ago • 1 comments

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

1superchip avatar Apr 05 '24 17:04 1superchip