Granary / granary2

Dynamic binary translation framework for instrumenting x86-64 user space Linux programs
MIT License
39 stars 5 forks source link

Add @CALL pseudo instruction for generating `lir::InlineFunctionCall`s directly. #104

Open pgoodman opened 9 years ago

pgoodman commented 9 years ago

Title says it all. The trick would be registers callable names to Granary via some mechanism.

pgoodman commented 9 years ago

I think if this is done, then the function being inlined should be pre-processed for actual inlining. This would make instrumentation quite a bit easier and more PIN-like. One tricky aspect is how describe code cache tiers. I think some special inline assembly might do here. Specifically, what we could do is some inline assembly that uses no instructions, but instead switches sections, and then stores the pointer of the block in the new section. This would be a nice annotation mechanism I think.