namhyung / uftrace

Function graph tracer for C/C++/Rust/Python
https://uftrace.github.io/slide/
GNU General Public License v2.0
3.05k stars 474 forks source link

generate dynamically patched execution binary #1061

Open honggyukim opened 4 years ago

honggyukim commented 4 years ago

It takes time for dynamic patching the target functions in the original execution binary.

It might be possible to generate a new dynamically patched binary for uftrace tracing. There are some benefits as follows:

The output binary contains

It requires some work but looks feasible.

namhyung commented 4 years ago

But it requires re-writing the ELF binary which affects section placements or maybe need to add new section(s).

honggyukim commented 4 years ago

It may be difficult to implement it, but I think it has a lot of benefits. I know that it take a lot of effort to implement though.