title: Dynamic patching of executable on BSD/Unix
body: <p>I'm facing quite a big problem. I need to patch an executable to modify its behaviour. The program is written in C and until now I've been using IDA to edit it, but that way I couldn't for example replace whole functions etc. It seems for me that the easiest way to do that is to create a kind of loader that will load the program and patch it before it runs. It would save me a lot time and all the editing would be much easier.</p>
  
  <p>The problem is that I can't find any article about how to do it. Could any of you explain how I should handle this process? The loader would be written in C/C++.</p>