diff options
author | kan <kan@FreeBSD.org> | 2009-06-20 14:16:41 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2009-06-20 14:16:41 +0000 |
commit | 51b981d72bb852d8a1bf8627132b440a55357373 (patch) | |
tree | cdea87ecece4a6a1105fb7ea064d9e43e7184672 /libexec/rtld-elf/rtld.h | |
parent | 65fed99c3c4662abaf496bef4a2472d30b95abb7 (diff) | |
download | FreeBSD-src-51b981d72bb852d8a1bf8627132b440a55357373.zip FreeBSD-src-51b981d72bb852d8a1bf8627132b440a55357373.tar.gz |
Allow order of initialization of loaded shared objects to be
altered through their .init code. This might happen if init
vector calls dlopen on its own and that dlopen causes some not
yet initialized object to be initialized earlier as part of that
dlopened DAG.
Do not reset module reference counts to zero on final fini vector
run when process is exiting. Just add an additional parameter to
force fini vector invocation regardless of current reference count
value if object was not destructed yet. This allows dlclose called
from fini vector to proceed normally instead of failing with handle
validation error.
Reviewed by: kib
Reported by: venki kaps
Diffstat (limited to 'libexec/rtld-elf/rtld.h')
-rw-r--r-- | libexec/rtld-elf/rtld.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 2b3b897..06086b4 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -218,9 +218,11 @@ typedef struct Struct_Obj_Entry { 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 */ + bool ref_nodel : 1; /* Refcount increased to prevent dlclose */ + bool init_scanned: 1; /* Object is already on init list. */ + bool on_fini_list: 1; /* Object is already on fini list. */ - struct link_map linkmap; /* for GDB and dlinfo() */ + struct link_map linkmap; /* For GDB and dlinfo() */ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ Objlist dagmembers; /* DAG has these members (%) */ dev_t dev; /* Object's filesystem's device */ |