Table 22 dl* routines for shared library management (continued)

Routine

“The dlmodremove Routine” (page 166) “The dlgetmodinfo Routine” (page 166)

Action

Removes information registered using dlmodadd.

Retrieves information about a loaded module (program or shared library).

All the dlopen routines are thread-safe. These routines are described in the dl*(3C) manpages.

The shl_load Routine Summary

The shl_load family of shared library management routines are available for both the PA32 (compatibility mode) and IPF/PA64 linker.

Use the following shl_load outines for shared library management:

Table 23 Routines for shared library management

Routine

Action

shl_load

Explicitly load a shared library. It lets you load a compatibility

 

or standard mode shared library. It does depth-first searching.

 

shl_findsym Finds the address of a global symbol in a shared

 

library.

shl_get and shl_get_r

Get information about currently loaded libraries. The shl_get_r

 

routine is a thread-safe version of the shl_get routine with

 

the same syntax.

shl_gethandle and shl_gethandle_r

Get descriptor information about a loaded shared library. The

 

shl_gethandle_r routine is a thread-safe version of the

 

shl_gethandle routine with the same syntax.

shl_definesym

Adds a new symbol to the global shared library symbol table.

shl_getsymbols

Returns a list of symbols in a shared library

shl_unload and cxxshl_unload

Unload a shared library.

Except for shl_get and shl_gethandle, all routines are thread safe. These routines are described in the shl_load(3x) manpage.

Related Files and Commands

The following commands and files provide more information about using shared library management routines.

Command/File

Action

a.out(4)

Executable file from assembler, compiler, and linker output.

cc(1)

Command to invoke the HP-UX C compiler.

exec(2)

System loader.

ld(1)

Command to invoke the linker.

Shared Library Header Files

The shl_load family of shared library management routines use some special data types (structures) and constants defined in the C-language header file /usr/include/dl.h. When using these functions from C programs, be sure to include dl.h:

#include <dl.h>

Similarly, if you are using the dlopen family of routines, include /usr/include/dlfcn.h.

Shared Library Header Files 137

Page 137
Image 137
HP UX Software Transition Kit (STK) manual Shared Library Header Files, Shlload Routine Summary, Related Files and Commands