Changeset View
Changeset View
Standalone View
Standalone View
libexec/rtld-elf/rtld.c
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | |||||
size_t tls_last_offset; /* Static TLS offset of last module */ | size_t tls_last_offset; /* Static TLS offset of last module */ | ||||
size_t tls_last_size; /* Static TLS size of last module */ | size_t tls_last_size; /* Static TLS size of last module */ | ||||
size_t tls_static_space; /* Static TLS space allocated */ | size_t tls_static_space; /* Static TLS space allocated */ | ||||
static size_t tls_static_max_align; | static size_t tls_static_max_align; | ||||
Elf_Addr tls_dtv_generation = 1; /* Used to detect when dtv size changes */ | Elf_Addr tls_dtv_generation = 1; /* Used to detect when dtv size changes */ | ||||
int tls_max_index = 1; /* Largest module index allocated */ | int tls_max_index = 1; /* Largest module index allocated */ | ||||
static bool ld_library_path_rpath = false; | static bool ld_library_path_rpath = false; | ||||
bool ld_fast_sigblock = false; | |||||
/* | /* | ||||
* Globals for path names, and such | * Globals for path names, and such | ||||
*/ | */ | ||||
const char *ld_elf_hints_default = _PATH_ELF_HINTS; | const char *ld_elf_hints_default = _PATH_ELF_HINTS; | ||||
const char *ld_path_libmap_conf = _PATH_LIBMAP_CONF; | const char *ld_path_libmap_conf = _PATH_LIBMAP_CONF; | ||||
const char *ld_path_rtld = _PATH_RTLD; | const char *ld_path_rtld = _PATH_RTLD; | ||||
const char *ld_standard_library_path = STANDARD_LIBRARY_PATH; | const char *ld_standard_library_path = STANDARD_LIBRARY_PATH; | ||||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | #endif | ||||
assert(aux_info[AT_BASE] != NULL); | assert(aux_info[AT_BASE] != NULL); | ||||
init_rtld((caddr_t) aux_info[AT_BASE]->a_un.a_ptr, aux_info); | init_rtld((caddr_t) aux_info[AT_BASE]->a_un.a_ptr, aux_info); | ||||
__progname = obj_rtld.path; | __progname = obj_rtld.path; | ||||
argv0 = argv[0] != NULL ? argv[0] : "(null)"; | argv0 = argv[0] != NULL ? argv[0] : "(null)"; | ||||
environ = env; | environ = env; | ||||
main_argc = argc; | main_argc = argc; | ||||
main_argv = argv; | main_argv = argv; | ||||
if (aux_info[AT_BSDFLAGS] != NULL && | |||||
(aux_info[AT_BSDFLAGS]->a_un.a_val & ELF_BSDF_SIGFASTBLK) != 0) | |||||
ld_fast_sigblock = true; | |||||
trust = !issetugid(); | trust = !issetugid(); | ||||
md_abi_variant_hook(aux_info); | md_abi_variant_hook(aux_info); | ||||
fd = -1; | fd = -1; | ||||
if (aux_info[AT_EXECFD] != NULL) { | if (aux_info[AT_EXECFD] != NULL) { | ||||
fd = aux_info[AT_EXECFD]->a_un.a_val; | fd = aux_info[AT_EXECFD]->a_un.a_val; | ||||
▲ Show 20 Lines • Show All 5,306 Lines • Show Last 20 Lines |