Back to index

glibc  2.9
Classes | Functions
dlsym.c File Reference
#include <dlfcn.h>
#include <stddef.h>
#include <ldsodefs.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  dlsym_args


static void dlsym_doit (void *a)
void * __dlsym (void *handle, const char *name DL_CALLER_DECL)

Class Documentation

struct dlsym_args

Definition at line 35 of file dlsym.c.

Class Members
void * handle
const char * name
void * sym
void * who

Function Documentation

void* __dlsym ( void *  handle,
const char *name  DL_CALLER_DECL 

Definition at line 56 of file dlsym.c.

# ifdef SHARED
  if (__builtin_expect (_dlfcn_hook != NULL, 0))
    return _dlfcn_hook->dlsym (handle, name, DL_CALLER);
# endif

  struct dlsym_args args;
  args.who = DL_CALLER;
  args.handle = handle; = name;

  /* Protect against concurrent loads and unloads.  */
  __rtld_lock_lock_recursive (GL(dl_load_lock));

  void *result = (_dlerror_run (dlsym_doit, &args) ? NULL : args.sym);

  __rtld_lock_unlock_recursive (GL(dl_load_lock));

  return result;

Here is the call graph for this function:

static void dlsym_doit ( void *  a) [static]

Definition at line 47 of file dlsym.c.

  struct dlsym_args *args = (struct dlsym_args *) a;

  args->sym = _dl_sym (args->handle, args->name, args->who);

Here is the call graph for this function:

Here is the caller graph for this function: