Add some debug messages for explicit rtld entry points
This commit is contained in:
parent
0bc9be2143
commit
2feaef06e3
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rtld.c,v 1.143 2011/03/27 13:14:42 joerg Exp $ */
|
||||
/* $NetBSD: rtld.c,v 1.144 2011/03/27 13:15:34 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 John D. Polstra.
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: rtld.c,v 1.143 2011/03/27 13:14:42 joerg Exp $");
|
||||
__RCSID("$NetBSD: rtld.c,v 1.144 2011/03/27 13:15:34 joerg Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -841,6 +841,7 @@ dlclose(void *handle)
|
|||
{
|
||||
Obj_Entry *root;
|
||||
|
||||
dbg(("dlclose of %p", handle));
|
||||
|
||||
_rtld_exclusive_enter();
|
||||
|
||||
|
@ -885,6 +886,8 @@ dlopen(const char *name, int mode)
|
|||
bool nodelete;
|
||||
bool now;
|
||||
|
||||
dbg(("dlopen of %s %d", name, mode));
|
||||
|
||||
_rtld_exclusive_enter();
|
||||
|
||||
flags |= (mode & RTLD_GLOBAL) ? _RTLD_GLOBAL : 0;
|
||||
|
@ -985,6 +988,8 @@ dlsym(void *handle, const char *name)
|
|||
void *retaddr;
|
||||
DoneList donelist;
|
||||
|
||||
dbg(("dlsym of %s in %p", name, handle));
|
||||
|
||||
lookup_mutex_enter();
|
||||
|
||||
hash = _rtld_elf_hash(name);
|
||||
|
@ -1095,6 +1100,8 @@ dladdr(const void *addr, Dl_info *info)
|
|||
void *symbol_addr;
|
||||
unsigned long symoffset;
|
||||
|
||||
dbg(("dladdr of %p", addr));
|
||||
|
||||
lookup_mutex_enter();
|
||||
|
||||
#ifdef __HAVE_FUNCTION_DESCRIPTORS
|
||||
|
@ -1163,6 +1170,8 @@ dlinfo(void *handle, int req, void *v)
|
|||
const Obj_Entry *obj;
|
||||
void *retaddr;
|
||||
|
||||
dbg(("dlinfo for %p %d", handle, req));
|
||||
|
||||
_rtld_shared_enter();
|
||||
|
||||
if (handle == RTLD_SELF) {
|
||||
|
@ -1211,6 +1220,8 @@ dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *), void *pa
|
|||
const Obj_Entry *obj;
|
||||
int error = 0;
|
||||
|
||||
dbg(("dl_iterate_phdr"));
|
||||
|
||||
_rtld_shared_enter();
|
||||
|
||||
for (obj = _rtld_objlist; obj != NULL; obj = obj->next) {
|
||||
|
|
Loading…
Reference in New Issue