Index: lib/libc/gen/auxv.c =================================================================== --- lib/libc/gen/auxv.c +++ lib/libc/gen/auxv.c @@ -70,7 +70,7 @@ static int pagesize, osreldate, canary_len, ncpus, pagesizes_len, bsdflags; static int hwcap_present, hwcap2_present; static char *canary, *pagesizes, *execpath; -static void *ps_strings, *timekeep; +static void *kpreload, *ps_strings, *timekeep; static u_long hwcap, hwcap2; static void *fxrng_seed_version; @@ -144,6 +144,11 @@ case AT_FXRNG: fxrng_seed_version = aux->a_un.a_ptr; break; + + case AT_KPRELOAD: + kpreload = aux->a_un.a_ptr; + break; + #ifdef __powerpc__ /* * Since AT_STACKPROT is always set, and the common @@ -370,6 +375,16 @@ } else res = EINVAL; break; + case AT_KPRELOAD: + if (buflen == sizeof(void *)) { + if (kpreload != NULL) { + *(void **)buf = kpreload; + res = 0; + } else + res = ENOENT; + } else + res = EINVAL; + break; default: res = ENOENT; break;