First page Back Continue Last page Overview Graphics
Sleepless: symbol hijacking example
Assume we have some program that uses some symbols (let's say the sleep function) from some shared library (the GNU C library, as an example.)
We want to hijack the symbol such as that every time the program will call the 'sleep' it will call our provided version of it and not the original.
What our 'sleep' function will do is print 'sleep less, do more' and then call the original sleep function but with half the sleep time requested.