Kenwood HP 9000 Personal Computer User Manual


 
234 Chapter 6
Shared Library Management Routines
The shl_load Shared Library Management Routines
One of the following modifiers can be ORed with both
the EXPORT_SYMBOLS and the INITIALIZERS flags:
NO_VALUES Do not calculate the value field of
the shl_symbol structure for
symbols. The value field has an
undefined value.
GLOBAL_VALUES
For symbols that are defined in
multiple libraries, this flag causes
shl_getsymbols to return the
most-visible occurrence, and to set
the value and handle fields of the
shl_symbol structure (defined in
the description of the symbols
parameter).
memfunc Points to a function that has the same interface (calling
conventions and return value) as malloc(3C). The
shl_getsymbols function uses this function to
allocate memory to store the array of symbol records,
symbols.
symbols This points to an array of symbol records for all
symbols that match the criteria determined by the type
and value parameters. The type of these records is
struct shl_symbol, defined in <dl.h> as:
struct shl_symbol {
char * name;
short type;
void * value;
shl_t handle;
};
The members of this structure are described in “The
shl_symbol Structure”.
Return Value
If successful, shl_getsymbols returns the number of symbols found;
otherwise, 1 is returned and shl_getsymbols sets errno to one of
these values:
ENOEXEC A format error was detected in the specified library.