libc: warn about unsupported RTLD_GLOBAL in dlopen()

Fixes #3779
This commit is contained in:
Christian Helmuth 2023-06-01 15:11:55 +02:00 committed by Norman Feske
parent 7441548458
commit 4a15621dc8

View File

@ -68,6 +68,9 @@ static Shared_object *to_object(void *handle)
void *dlopen(const char *name, int mode)
{
if (mode & RTLD_GLOBAL)
warning("ignoring unsupported RTLD_GLOBAL in dlopen()");
int supported = RTLD_LAZY | RTLD_NOW | RTLD_LOCAL | RTLD_GLOBAL | RTLD_NODELETE;
/* error on unsupported mode values */