3 ms·
It definitely is if you want a 100% correct and 100% certain answer. But if you accept 3 categories 1: this we know is used 2: this we know is not used, 3 this
by Epa095 4y ago
It definitely is if you want a 100% correct and 100% certain answer. But if you accept 3 categories 1: this we know is used 2: this we know is not used, 3 this we don't know anything about, then it's doable.
- colejohnson66 4y agoBut (2) requires knowing everything the binary will do. You can’t know what something won’t do without knowing what it will do.
- tadfisher 4y agoYou can do (2) if you can tolerate false positives. For example, if a symbol isn't referenced literally elsewhere in the binary, consider it unused, but add a configuration option to keep it in case it is referenced dynamically. The JVM world has been doing this for years with ProGuard.
- yarg 4y agoBranches are a problem, depending on the number of parameters needed to be evaluated: > Solving a constraint satisfaction problem on a finite domain is an NP-complete problem in general. https://en.wikipedia.org/wiki/Complexity_of_constraint_satisfaction https://en.wikipedia.org/wiki/Complexity_of_constraint_satis...