Open meme opened 4 years ago
I use gcc9.3 (ubuntu20.04) without error, but use gcc7.5 (ubuntu18.04) to report junk error:
/tmp/ccnxYEFu.s: Assembler messages: /tmp/ccnxYEFu.s:15: Error: junk
(%rip)' after expression
/tmp/ccnxYEFu.s:18: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:19: Error: junk
(%rip)' after expression
/tmp/ccnxYEFu.s:39: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:68: Error: junk
(%rip)' after expression
/tmp/ccnxYEFu.s:83: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:104: Error: junk
(%rip)' after expression
/tmp/ccnxYEFu.s:119: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:148: Error: junk
(%rip)' after expression
/tmp/ccnxYEFu.s:168: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:202: Error: junk
(%rip)' after expression
/tmp/ccnxYEFu.s:205: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:206: Error: junk
(%rip)' after expression`
GCC >= 9 is required to use this software. In the future, please make a new issue for reporting compiler errors.
Yes, the junk block is quite a "signature" for the opaque path. We probably should not insert a new thing for it at all; we should let it jump onto some existing code and confuse the reverser. I am not sure how simple/hard it is to do in gimple though.
Also after the junk it jumps back to the beginning of the conditional block -- which makes it more obvious.
If you'd like: describe exactly what you're looking to do and I can try to help describe the IR. The current BCF is effectively a placeholder.
I have solved this problem on GCC 7.5.0.
Currently the BCF "junk" is a GIMPLE NOP which is pretty ineffective at deterring reversing by itself (since it is clear which block is the opaque path)