kubo / plthook

Hook function calls by replacing PLT(Procedure Linkage Table) entries.
745 stars 152 forks source link

Resolve unresolved PLT entries while replacing (hooking) #21

Closed milabs closed 4 years ago

milabs commented 4 years ago

This fixes the problem of hooking symbols which are not resolved at the time of hooking.

kubo commented 4 years ago

I won't merge it. I'll add notice that the oldfunc may point to an unresolved PLT entry instead. I'll keep this issue open and close it after I fix document.

milabs commented 4 years ago

I won't merge it. I'll add notice that the oldfunc may point to an unresolved PLT entry instead. I'll keep this issue open and close it after I fix document.

How do you think it should be possible to solve the issue of hooking yet unresolved PLT entries? What's the correct approach in your opinion?

kubo commented 4 years ago

How do you think it should be possible to solve the issue of hooking yet unresolved PLT entries? What's the correct approach in your opinion?

README.md was updated. There is no need to use oldfunc in the first sample code in Usage. Use dlsym() outside of plthook_replace() in the second.