Live data from Hacker News

A static binary rewriter that does not use heuristics

github.com

1–10 of 17 posts

Re: A static binary rewriter that does not use heuristics

#4
post #3

I read the readme. I still don't know what is "rewriting" a binary or why one would want to do it. Can someone explain?

Have a look at the example icount.py: It rewrites binaries to count the number of instructions executed.

Therefore it seems the rewriter can modify already existing binaries corresponding to some rules in Python files by inserting additional instructions.

Re: A static binary rewriter that does not use heuristics

#5
post #2

Could this tool be used to produce eg a statically-linked version of `curl` that would work the same on any Linux, without needing to build curl from sources?

It does not appear that "static binary rewriter" in this context means that it turns dynamically linked binaries into statically linked binaries, so probably not.

Re: A static binary rewriter that does not use heuristics

#8
post #2

Could this tool be used to produce eg a statically-linked version of `curl` that would work the same on any Linux, without needing to build curl from sources?

It does not appear that "static binary rewriter" in this context means that it turns dynamically linked binaries into statically linked binaries, so probably not.

So, what does the word “static” mean in this context, that the binary’s behavior does not change?

Re: A static binary rewriter that does not use heuristics

#9
post #3

I read the readme. I still don't know what is "rewriting" a binary or why one would want to do it. Can someone explain?

Take a binary and make changes to it (without breaking anything unintentionally). E.g. add hooks for performance measurements, add additional security checks, make it use/not use specific CPU instructions.

Re: A static binary rewriter that does not use heuristics

#10
post #8

Earlier quoted context omitted.

It does not appear that "static binary rewriter" in this context means that it turns dynamically linked binaries into statically linked binaries, so probably not.

So, what does the word “static” mean in this context, that the binary’s behavior does not change?

I imagine it means that it takes the binary file, generates a new binary file, and is done, as opposed to rewriting things at runtime or needing profiling information from a prior run of the binary.
Post reply on HN