by mschuster91 · 10y ago · 0 comments
Normally, asm would do
call slow_hash
at every place where slow_hash is invoked, but now it has to check at every invocation a pointer with the address of the function.Of course the loader could walk through all uses of the pointer to slow_hash and replace them by fast_hash on loading, but that won't work for selfmodifying (packed, or RE-protected) code.
That's the point of doing this in the linker - if you were going to look up the right function every call, you could do that entirely without special linker or compiler support.
call's jxx's are expensive, hense CMOV ^_^