next up previous contents index
Next: 21.1.4 dlclose: Delete a Up: 21.1 Introduction Previous: 21.1.2 dlopen: Load a

21.1.3 dlsym: Find the address binding for a symbol

 

SYNOPSIS

#include <dlfnc.h>

void *dlsym(void *handle, const char *name);

DESCRIPTION

Return the address binding of the symbol name from the shared library identified by handle. The symbols that are exported from shared libraries loaded with dlopen, can only be accessed with dlsym. The name of the symbol is its assembly language representation, which is not necessarily the same as its representation in the C source code. Be sure to consult your local compiler documentation. If the symbol cannot be found, dlsym returns NULL and and sets an error condition which may be queried with dlerror.

PARAMETERS

handle
The descriptor of the shared library to search.
name
The name of the symbol to search for.

RETURNS

Returns the address binding of the symbol on success, NULL otherwise.



Utah Flux Research Group