icon Top 9 categories map      RocketAware > man pages >

dlfcn(3)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD Others



DLFCN(3)                  OpenBSD Programmer's Manual                 DLFCN(3)

NAME
     dlopen, dlclose, dlsym, dlctl, dlerror - dynamic link interface



SYNOPSIS
     #include <dlfcn.h>

     void *
     dlopen(char *path, int mode);

     int
     dlclose(void *handle);

     void *
     dlsym(void *handle, char *symbol);

     int
     dlctl(void *handle, int cmd, void *data);

     char *
     dlerror(void);

DESCRIPTION
     These functions provide an interface to the run-time linker ld.so.  They
     allow new shared objects to be loaded into a process's address space un-
     der program control.  The dlopen() function takes a name of a shared ob-
     ject as its first argument. The shared object is mapped into the address
     space, relocated and its external references are resolved in the same way
     as is done with the implicitly loaded shared libraries at program start-
     up. The argument can either be an absolute pathname or it can be of the
     form ``lib<name>.so[.xx[.yy]]'' in which case the same library search
     rules apply that are used for ``intrinsic'' shared library searches.  The
     second argument currently has no effect, but should be set to DL_LAZY for
     future compatibility.  dlopen() returns a handle to be used in calls to
     dlclose(), dlsym() and dlctl().  If the named shared object has already
     been loaded by a previous call to dlopen() (and not yet unloaded by
     dlclose()), a handle referring to the resident copy is returned.

     dlclose() unlinks and removes the object referred to by handle from the
     process address space. If multiple calls to dlopen() have been done on
     this object (or the object was once loaded at startup time) the object is
     removed when its reference count drops to zero.

     dlsym() looks for a definition of symbol in the shared object designated
     by handle. The symbol's address is returned. If the symbol cannot be re-
     solved, NULL is returned.

     dlctl() provides an interface similar to ioctl(2) to control several as-
     pects of the run-time linker's operation. This interface is currently un-
     der development.

     dlerror() returns a character string representing the most recent error
     that has occurred while processing one of the other functions described
     here.

SEE ALSO
     ld(1),  rtld(1),  link(5)

HISTORY
     Some of the dl* functions first appeared in SunOS 4.

BUGS
     An error that occurs while processing a dlopen() request results in the
     termination of the program.

OpenBSD 2.6                   September 30, 1995                             1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]


[Overview Topics]

Up to: Libraries - Object (compiled) libraries, linked and dynamically loaded. Static and Shared libraries


RocketLink!--> Man page versions: OpenBSD FreeBSD Others






Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > dlfcn.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments