Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[waiting patch] The more elegant and effective hook method on Windows 32/64 #574

Closed
alk opened this issue Aug 23, 2015 · 1 comment
Closed

Comments

@alk
Copy link
Contributor

alk commented Aug 23, 2015

Originally reported on Google Code with ID 571

tcmalloc using a "GangBoard" mechanism which need to change some opcodes at the begining
of the hook function.

But at least on 32bit and 64bit windows, there is a more elegant and effective hook
mechanism: we can change the module's (exe or dll) IAT (Import address table) entry
directly to implement the hook. 

This method doesn't need the disassembler nor changing any opcode, Just rewrite the
function pointer of corresponding IAT entries. 

And because the hooked function will be invocked directly, there is no need to do a
"GangBoard" jump for each call, so it will gains more efficient.

Reported by baiyang on 2013-09-17 10:56:00

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Changed title to reflect that there are no plans to work on that. But patch is welcome.

Reported by alkondratenko on 2013-09-17 15:36:57

@alk alk closed this as completed Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant