GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
RTLD_GET_VAR(3) FreeBSD Library Functions Manual RTLD_GET_VAR(3)

rtld_get_var, rtld_set_varquery or change run-time linker parameters after image activation

Standard C Library (libc, -lc)

#include <sys/errno.h>
#include <link.h>

const char *
rtld_get_var(const char *name);

int
rtld_set_var(const char *name, const char *value);

The dynamic linker rtld(1) can be configured by setting some environment variables for the process, before image activation. Sometimes it is desirable to query the current effective settings or change them afterward.

Since the process environment variables are maintained by higher-level libraries, the run-time linker cannot access them after the image activation. The described functions make it possible to operate on rtld settings.

The () function returns the current value of the named parameter.

The () functions changes the value of the parameter to the new value value, if possible. The name argument to both functions is the name of the parameter, which is same as the corresponding environment variable (see rtld(1)) but without the LD_ (or LD_32_ or any other ABI-specific) prefix.

The rtld_get_var() returns the current value of the named parameter, or NULL if the name is invalid.

The rtld_set_var() returns 0 on success, or an integer indicating the error condition which prevented the operation.

Possible errors returned from rtld_set_var():

[]
The requested change cannot be made at runtime, either because the runtime linker can only take this parameter at initialization time, or because the current process is executing with elevated privileges.
[ENOENT]
The supplied parameter name is unknown.

rtld(1)

The rtld_get_var function first appeared in FreeBSD 14.3.

October 31, 2024 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.