comparison dynload/dynload.3 @ 228:f8a6e60598cc

- completed dynload API doc
author Tassilo Philipp
date Sun, 16 Apr 2017 13:34:39 +0200
parents 7076f551faf5
children 2a77747a5496
comparison
equal deleted inserted replaced
227:318a9ffc2b85 228:f8a6e60598cc
25 .Fn dlLoadLibrary "const char * libpath" 25 .Fn dlLoadLibrary "const char * libpath"
26 .Ft void 26 .Ft void
27 .Fn dlFreeLibrary "DLLib * pLib" 27 .Fn dlFreeLibrary "DLLib * pLib"
28 .Ft void * 28 .Ft void *
29 .Fn dlFindSymbol "DLLib * pLib" "const char * pSymbolName" 29 .Fn dlFindSymbol "DLLib * pLib" "const char * pSymbolName"
30 .Ft DLSyms*
31 .Fn dlSymsInit "const char * libPath"
32 .Ft void
33 .Fn dlSymsCleanup "DLSyms * pSyms"
34 .Ft int
35 .Fn dlSymsCount "DLSyms * pSyms"
36 .Ft const char*
37 .Fn dlSymsName "DLSyms * pSyms" "int index"
38 .Ft const char*
39 .Fn dlSymsNameFromValue "DLSyms * pSyms" "void * value"
30 .Sh DESCRIPTION 40 .Sh DESCRIPTION
31 The 41 The
32 .Nm 42 .Nm
33 library provides an interface to load foreign dynamic libraries and access 43 library provides an interface to load foreign dynamic libraries and access
34 to their symbols. 44 to their symbols.
52 returns a pointer to a symbol with name 62 returns a pointer to a symbol with name
53 .Ar pSymbolName 63 .Ar pSymbolName
54 in the library with handle 64 in the library with handle
55 .Ar pLib , 65 .Ar pLib ,
56 or returns a null pointer if the symbol cannot be found. The name is specified as it would appear in C source code (mangled if C++, etc.). 66 or returns a null pointer if the symbol cannot be found. The name is specified as it would appear in C source code (mangled if C++, etc.).
67 .Pp
68 The dlSyms* functions can be used to iterate over symbols. Note that they are made
69 for symbol name lookups, not to get a symbol's address. For that refer to
70 .Fn dlFindSymbol .
71 .Fn dlSymsInit
72 will return a handle (or null pointer on error) to the shared object specified by
73 .Ar libPath .
74 The returned handle is to be used with the other dlSyms* functions. The handle must be freed with
75 .Fn dlSymsCleanup .
76 .Fn dlSymsCount
77 returns the number of symbols in the shared object,
78 .Fn dlSymsName
79 and
80 .Fn dlSymsNameFromValue
81 are used to lookup symbol names using an index or symbol's address, respectively, returning a null pointer on error. The names are returned as they would appear in C source code (mangled if C++, etc.). The address passed to
82 .Fn dlSymsNameFromValue
83 must point to a loaded symbol.
57 .Sh SEE ALSO 84 .Sh SEE ALSO
58 .Xr dyncall 3 , 85 .Xr dyncall 3 ,
59 .Xr dyncallback 3 86 .Xr dyncallback 3
60 and the dyncall manual (available in HTML and PDF format) for more information. 87 and the dyncall manual (available in HTML and PDF format) for more information.
61 .Sh AUTHORS 88 .Sh AUTHORS