diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-11-09 18:44:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-11-09 18:44:12 +0000 |
commit | 71e5518c0a24159027e4e2eeba957c84e33a78fd (patch) | |
tree | a4b6eaa9dd90c8f00fb7091fb1ada5f047baa67b /libexec | |
parent | 670b414f2bff996a276a3542f500b896d265d474 (diff) |
dlopen() with RTLD_NODELETE should also set the object nodelete flag,
so the mapping layer will know it can use mimmutable()
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/dlfcn.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c index 0881a10f45b..a5b410b14c0 100644 --- a/libexec/ld.so/dlfcn.c +++ b/libexec/ld.so/dlfcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dlfcn.c,v 1.112 2022/11/07 10:35:26 deraadt Exp $ */ +/* $OpenBSD: dlfcn.c,v 1.113 2022/11/09 18:44:11 deraadt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -97,8 +97,10 @@ dlopen(const char *libname, int flags) goto loaded; } - if (flags & RTLD_NODELETE) + if (flags & RTLD_NODELETE) { object->obj_flags |= DF_1_NODELETE; + object->nodelete = 1; + } _dl_link_dlopen(object); |