HomeFreeBSD

rtld: avoid use of of getenv(3) for evaluating rtld env vars (LD_XXX)

Description

rtld: avoid use of of getenv(3) for evaluating rtld env vars (LD_XXX)

Scan through the set of environment variables during initialization and
store values in the corresponding ld_env_var_desc structure, in the
single pass at init time. This does not eliminate use of getenv(3) and
unsetenv(3) completely, but provides a foundation to do that as the next
step.

Also organize the scan in a way that makes it easier to support aliases
like LD_DEBUG vs. LD_64_DEBUG.

Suggested by: arichardson
Reviewed by: arichardson, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31545

Details

Provenance
kibAuthored on Aug 16 2021, 12:59 PM
Reviewer
arichardson
Differential Revision
D31545: rtld: rework how environment variables are named
Parents
rG451dc2b7cc0c: rtld: rework how environment variables are named
Branches
Unknown
Tags
Unknown