I want to replace all instances of ‘::memcpy()’ with my custom made ‘customMemcpy()’ defined in a file ‘Memory.h’ in my project. This call is made from lot of places so doing it manually is pain. Is there any clever method to do it programmatically?
I want to replace all instances of ‘::memcpy()’ with my custom made ‘customMemcpy()’ defined
Share
You can use wrapping mechanism, see http://sourceware.org/binutils/docs/ld/Options.html (find
--wrap=symbol) for example. This way gives you acess both to your and original function.