Skip to content

fix: Resolve environ symbol in PIE executables and glibc's dynamic linker#108

Merged
basil merged 2 commits into
masterfrom
env
Mar 3, 2026
Merged

fix: Resolve environ symbol in PIE executables and glibc's dynamic linker#108
basil merged 2 commits into
masterfrom
env

Conversation

@basil

@basil basil commented Mar 3, 2026

Copy link
Copy Markdown
Owner

Skip LOCAL-binding symbols during symbol lookup, as they are file-scoped and should never match external lookups like environ. Recognize glibc's dynamic linker (ld-linux-*.so) as a C runtime module so its environ symbol is found when no copy relocation exists (PIE executables, Rust programs, etc.).

Add integration tests verifying that penv and pargs -e reflect runtime setenv changes read from the live environ symbol.

…nker

Skip LOCAL-binding symbols during symbol lookup, as they are
file-scoped and should never match external lookups like `environ`.
Recognize glibc's dynamic linker (`ld-linux-*.so`) as a C runtime
module so its `environ` symbol is found when no copy relocation
exists (PIE executables, Rust programs, etc.).

Add integration tests verifying that `penv` and `pargs -e` reflect
runtime `setenv` changes read from the live `environ` symbol.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@basil basil added the Type: Bug An unexpected problem or behavior label Mar 3, 2026
@github-actions github-actions Bot added the Component: Process Source Issues related to process sources label Mar 3, 2026
@basil basil changed the title fix: Resolve environ symbol in PIE executables and glibc's dynamic li… fix: Resolve environ symbol in PIE executables and glibc's dynamic linker Mar 3, 2026
@basil
basil merged commit 3b80fc3 into master Mar 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Process Source Issues related to process sources Type: Bug An unexpected problem or behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant