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

i#1973: musl: Support late injection #7254

Merged
merged 4 commits into from
Feb 8, 2025

Conversation

ziyao233
Copy link
Member

@ziyao233 ziyao233 commented Feb 6, 2025

Musl supplies no argument to constructors in .init section, thus it's hard to retrieve environment variables without libc functions. Let's depend on "environ" variable for now, which is relatively fine in libdrpreload.so.

This fixes tests requiring late injection on musl, including common.fib, common.nativeexec and common.nativeexec_{exe,bindnow}*.

Issue: #1973

Musl supplies no argument to constructors in .init section, thus it's
hard to retrieve environment variables without libc functions. Let's
depend on "environ" variable for now, which is relatively fine in
libdrpreload.so.

This fixes tests requiring late injection on musl, including common.fib,
common.nativeexec and common.nativeexec_{exe,bindnow}*.

Issue: DynamoRIO#3544
@ziyao233 ziyao233 changed the title i#3544: musl: Support late injection i#1973: musl: Support late injection Feb 6, 2025
core/unix/preload.c Show resolved Hide resolved
core/unix/preload.c Show resolved Hide resolved
@ziyao233 ziyao233 merged commit a13ca48 into DynamoRIO:master Feb 8, 2025
19 checks passed
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

Successfully merging this pull request may close these issues.

2 participants