HexHive / retrowrite

RetroWrite -- Retrofitting compiler passes through binary rewriting
Other
655 stars 78 forks source link

[BUG] RetroWrite does not disassemble a set of functions #35

Open miksh opened 2 years ago

miksh commented 2 years ago

RetroWrite does not disassemble certain functions especially when their symbol visibilities are 'STV_HIDDEN.' Moreover, the omission causes recompilation errors.

I examined source code, and found the following code that filters out hidden functions.

https://github.com/HexHive/retrowrite/blob/120e73859c2d76b712bfd609ce91c0a8a4d003d7/librw_x64/loader.py#L202-L204

I think the above code should be removed to fix the bug. Thank you.

Test Environment.

  1. Platform: Ubuntu 18.04, x86-64
  2. Compiler: gcc-7
  3. Target binary: binutils-2.31.1/objcopy