HomeFreeBSD

rtld: properly handle update of several vars in rtld_set_var()

Description

rtld: properly handle update of several vars in rtld_set_var()

Besides setting the value in the array of the values, rtld sometimes
needs to recalculate some internal control variable for the change to
take effect. Allow the variable description to supply a method called
on the update. Lock the function with the bind lock for safe operation.

Mark several variables as allowed for update, since the on_update method
is provided for them. The list is LD_BIND_NOW, LD_BIND_NOT,
LD_LIBMAP_DISABLE, LD_LOADFLTR.

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

Details

Provenance
kibAuthored on Mar 24 2026, 1:43 AM
Reviewer
markj
Differential Revision
D56055: rtld: properly handle update of several vars in rtld_set_var()
Parents
rGf39754d51b7d: fenv.h: stop declaring feclearexcept() extern inline
Branches
Unknown
Tags
Unknown