4 ms·
> How much could you actually transform with a high degree of certainty that you don't break the application? Compilers routinely "modify" the programs given t
by dguido 10y ago
> How much could you actually transform with a high degree of certainty that you don't break the application?
Compilers routinely "modify" the programs given to them via optimization passes and the like. This is normal. By having access to bitcode, you're essentially given a second chance at compiling an application. Forget to turn on control flow integrity? Want to optimize out a useless API call? You can fix that.
We even do it far more aggressively by lifting binaries back to LLVM bitcode with mcsema, then outputting significantly modified binaries with new functionality. See https://github.com/trailofbits/mcsema https://github.com/trailofbits/mcsema for more info. There is breakage when we do this because we can't be sure of the correct control flow through the application, but you won't have this problem if you're not lifting back from a binary.
You're also only focusing on the modification part. Don't forget that bitcode provides a far more suitable target for analysis than binary code.