libfixit - Fix It with scriptable link time patching!
libfixit is a small library that offers link-time patching and can be used
to change (fix) or limit behavior of applications. Libfixit figures the
name of the application and loads and runs a fawk script matching that name.
The fawk script can instruct libfixit to take over selected libc calls
and filter them through fawk functions.
For example, the fawk script can:
- ask libfixit to take over open()
- then look at what the arguments each open the application does
- can deny opens (return error) for some paths
- can modify the arguments (e.g. transparently change path)
- or can pass through all arguments as is
There are two ways of using libfixit:
- for precompiled, dynamic linked executables as an LD_PRELOAD .so
- linking to the executable directly when the app is compiled from source