diff options
author | kib <kib@FreeBSD.org> | 2009-03-30 08:47:28 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-03-30 08:47:28 +0000 |
commit | 566c4f31f122544715745d4e127eaf47249d194b (patch) | |
tree | 7fa11a9c6f5eb076d989897ba5ab3e64c0101750 /libexec/rtld-elf/rtld.h | |
parent | 96b9a81fd8f883257674bf829243b5ee4b7e74df (diff) | |
download | FreeBSD-src-566c4f31f122544715745d4e127eaf47249d194b.zip FreeBSD-src-566c4f31f122544715745d4e127eaf47249d194b.tar.gz |
Implement support for RTLD_NODELETE flag for dlopen() and -z nodelete
static linker option. Do it by incrementing reference count on the loaded
object and its dependencies.
Reviewed by: davidxu, kan
Diffstat (limited to 'libexec/rtld-elf/rtld.h')
-rw-r--r-- | libexec/rtld-elf/rtld.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index f47c2151..1d7ffb2 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -217,6 +217,8 @@ typedef struct Struct_Obj_Entry { bool tls_done : 1; /* Already allocated offset for static TLS */ bool phdr_alloc : 1; /* Phdr is allocated and needs to be freed. */ bool z_origin : 1; /* Process rpath and soname tokens */ + bool z_nodelete : 1; /* Do not unload the object and dependencies */ + bool ref_nodel : 1; /* refcount increased to prevent dlclose */ struct link_map linkmap; /* for GDB and dlinfo() */ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ |