Function interposition in Linux without dlsym
see ld’s option –wrap symbol. From the man page: –wrap symbol Use a wrapper function for symbol. Any undefined reference to symbol will be resolved to “__wrap_symbol“. Any undefined reference to “__real_symbol” will be resolved to symbol. This can be used to provide a wrapper for a system function. The wrapper function should be called … Read more