Kenwood HP 9000 Personal Computer User Manual


 
Chapter 6 235
Shared Library Management Routines
The shl_load Shared Library Management Routines
ENOSYM Some symbol required by the shared library could not
be found.
EINVAL The specified handle is invalid.
ENOMEM memfunc failed to allocate the requested memory.
The shl_symbol Structure
The members of the shl_symbol structure are defined as follows:
name Contains the name of a symbol.
type Contains the symbol's type: TYPE_PROCEDURE,
TYPE_DATA, or TYPE_STORAGE. TYPE_STORAGE is a
data symbol used for C uninitialized global variables or
FORTRAN common blocks.
value Contains the symbol's address. It is valid only if
EXPORT_SYMBOLS is specified without the NO_VALUES
modifier.
handle Contains the handle of the shared library in which the
symbol is found, or NULL in the case of symbols defined
by shl_definesym. It is valid only if
EXPORT_SYMBOLS or INITIALIZERS were requested
without the NO_VALUES modifier. It is especially useful
when used with the GLOBAL_VALUES modifier, allowing
you to determine the library in which the most-visible
definition of a symbol occurs.
shl_getsymbols Example
“show_symbols — Display Shared Library Symbols” shows the source for
a function named show_symbols that displays shared library symbols.
The syntax of this routine is defined as:
int show_symbols(shl_t hndl,
short type,
int flags)
hndl The handle of the shared library whose symbols you
want to display.