HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
s
shl_load(3X) shl_load(3X)
returned. See DIAGNOSTICS for errno settings.
shl_definesym()
Adds a symbol to the user hash table for the current process. If value falls in the
range of a currently loaded library, an association will be made and the symbol is
undefined once the associated library is unloaded. The defined symbol can be overrid-
den by a subsequent call to this routine or by loading a more visible library that pro-
vides a definition. Symbols overridden in this manner may become visible again if the
overriding definition is removed.
Possible symbol types include:
TYPE_PROCEDURE Symbol is a function.
TYPE_DATA Symbol is data.
Possible flag values include: None defined at the present time. Zero should be passed
in to prevent conflicts with future uses of this flag. You cannot use this routine to
define a thread local storage symbol. dlsym() will not search for any user defined
symbol.
shl_getsymbols()
Provides an array of symbol records, allocated using the supplied memory allocator,
that are associated with the library specified by handle. If the handle argument is a
pointer to
NULL, symbols defined using shl_definesym()
are returned. If multi-
ple versions of the same symbol have been defined with
shl_definesym()
, only
the version from the specified symbol information source that would be considered for
symbol binding is returned. The type argument is used to restrict the return informa-
tion to a specific type. Values of
TYPE_PROCEDURE
and TYPE_DATA can be used
to limit the returned symbols to be either code or data respectively. On PA32, you can
also specify a type of
TYPE_STORAGE or TYPE_TSTORAGE
. The TYPE_DATA
value cause both data, storage, and tstorage symbols to be returned. The constant
TYPE_UNDEFINED can be used to return all symbols, regardless of type. The flags
argument must have one of the following values:
IMPORT_SYMBOLS
Return symbols found on the import list.
EXPORT_SYMBOLS
Return symbols found on the export list. All symbols defined by
shl_definesym() are export symbols.
INITIALIZERS
Return symbols that are specified as the initializers of the
library.
Zero or more of the following can be specified by doing a bitwise
OR operation:
NO_VALUES Only makes sense when combined with EXPORT_SYMBOLS or
INITIALIZERS . Do not calculate the value field in the return
structure to avoid symbol binding by the loader to resolve symbol
dependencies. If only a few symbol values are needed,
shl_findsym() can be used to find the values of interesting
symbols. This is not to be used with GLOBAL_VALUES
.
GLOBAL_VALUES
Only makes sense when combined with EXPORT_SYMBOLS
or
INITIALIZERS . Use the name and type information of each
return symbol and find the most visible occurrence using all sym-
bol information sources. The value and handle fields in the sym-
bol return structure reflect where the most visible occurrence
was found. Not to be used with NO_VALUES.
The memory argument should point to a function with the same interface as mal-
loc()
(see malloc(3C)).
The return information consists of an array of the following records (defined in
<dl.h>):
HP-UX Release 11i: December 2000 − 3 − Section 3−−853
___
___