Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statically linked code is not removed when decompiling through the IDA plugin #10

Open
s3rvac opened this issue Jan 14, 2018 · 0 comments

Comments

@s3rvac
Copy link
Member

s3rvac commented Jan 14, 2018

When the attached PE binary file is decompiled through the IDA plugin, statically linked code is not removed, but when I decompile it directly through decompile.sh, it is removed.

Input and output files

The input and both output C files can be downloaded here.

Steps to reproduce

  1. Decompile the input binary file hello-world.exe through the IDA plugin via run-ida-decompilation.sh:
    $ run-ida-decompilation.sh hello-world.exe -o hello-world.idpalugin.c
  2. Decompile the same file directly through decompile.sh:
    $ decompile.sh hello-world.exe -o hello-world.decompile-sh.c

Expected output

The input binary file hello-world.exe contains just main() with printf("Hello, world!");. This is exactly what decompile.sh produces in hello-world.decompile-sh.c (just a single main() function and nothing more).

However, hello-world.idaplugin.c contains not only _main() but also 47 other functions that come from statically linked code. I would expect them to be removed, just like when the file is decompiled directly through decompile.sh.

Configuration

  • retdec commit: 8c4b23d (current master)
  • retdec-idaplugin commit: e249927 (current master)
  • 64b Arch Linux, GCC 7.2.1, Debug builds of both RetDec and IDA plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants