dlsym

Obtains the address of a symbol from a dlopen object.

Library:LibC
Classification:POSIX
Service:Library

Syntax

  #include <dlfcn.h> 
   
  void *dlsym (
     void         *handle,
     const char   *name);
  

Parameters

handle

(IN) Points to the dlopen object.

name

(IN) Points to the name of the symbol. This name has a maximum length of 255 (MAX_SYMNAME_LEN).

Return Values

If successful, returns a address of the specified symbol. If the symbol cannot be found, returns a NULL pointer and sets a value for dlerror.

Remarks

For sample code, see DLFcn.c.

See Also