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

constructor attribute #2

Open
pitust opened this issue May 9, 2020 · 0 comments
Open

constructor attribute #2

pitust opened this issue May 9, 2020 · 0 comments

Comments

@pitust
Copy link

pitust commented May 9, 2020

AFAIK when a ashared library is loaded, its symbols can be defined as a constructor (in C it is done with __attribute__((__constructor__)) (under GCC). This lets you run any code once the linker finished loading stuff.
What I propose is instead of hooking some function like strrchr, we simply define some entrypoint as a constructor (possibly by post-processing the ELF binary).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant