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

Update global ctor/dtor instrumentation for static executables #1355

Merged
merged 21 commits into from Feb 23, 2023

Conversation

hainest
Copy link
Contributor

@hainest hainest commented Jan 26, 2023

glibc-2.34 removed __libc_csu_init(fini) which was used as instrumentation points for Dyninst's global constructor(destructor). We now insert the global Dyninst constructor into the beginning of 'main' and the global destructor into the beginning of 'exit'.

@hainest hainest requested a review from kupsch January 26, 2023 19:48
@hainest hainest self-assigned this Jan 26, 2023
@hainest hainest added bug dyninstAPI_RT This issue affects the DyninstAPI runtime library language runtime Related to language runtimes like glibc, libstdc++, etc. labels Jan 26, 2023
@hainest
Copy link
Contributor Author

hainest commented Jan 26, 2023

This is just for x86. I'll update ARM and ppc once I test this.

@hainest
Copy link
Contributor Author

hainest commented Feb 18, 2023

Testing fine all all platforms.

@hainest
Copy link
Contributor Author

hainest commented Feb 23, 2023

@kupsch Could you take a quick pass over this? It's testing fine, but I want to make sure I didn't do something stupid.

@kupsch kupsch self-requested a review February 23, 2023 20:00
@hainest hainest merged commit 3046332 into dyninst:master Feb 23, 2023
@hainest hainest deleted the glibc_elf_constructors branch February 23, 2023 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dyninstAPI_RT This issue affects the DyninstAPI runtime library language runtime Related to language runtimes like glibc, libstdc++, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants