comparison dynload/dynload.3 @ 248:ab23f9f2934a

- BeOS impl for dlGetLibraryPath - more dynload doc clarifications
author Tassilo Philipp
date Fri, 05 May 2017 13:13:43 +0200
parents 2a77747a5496
children 7cb8a0aaf638
comparison
equal deleted inserted replaced
247:446d2220bc49 248:ab23f9f2934a
76 .Ar bufSize 76 .Ar bufSize
77 (in bytes), to hold the output string. The return value is the size of the buffer (in bytes) needed to hold the null-terminated string, or 0 if it can't be looked up. If 77 (in bytes), to hold the output string. The return value is the size of the buffer (in bytes) needed to hold the null-terminated string, or 0 if it can't be looked up. If
78 .Ar bufSize 78 .Ar bufSize
79 >= return value > 1, a null-terminted string with the path to the library should be in 79 >= return value > 1, a null-terminted string with the path to the library should be in
80 .Ar sOut . 80 .Ar sOut .
81 If it returns 0, the library name wasn't able to be found. Please note that this might happen in some rare cases, so make sure to always check.
81 .Pp 82 .Pp
82 The dlSyms* functions can be used to iterate over symbols. Since they can be used on libraries that are not linked, they are made 83 The dlSyms* functions can be used to iterate over symbols. Since they can be used on libraries that are not linked, they are made
83 for symbol name lookups, not to get symbols' addresses. For that refer to 84 for symbol name lookups, not to get symbols' addresses. For that refer to
84 .Fn dlFindSymbol . 85 .Fn dlFindSymbol .
85 .Fn dlSymsInit 86 .Fn dlSymsInit
95 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 96 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
96 .Fn dlSymsNameFromValue 97 .Fn dlSymsNameFromValue
97 must point to a loaded symbol. 98 must point to a loaded symbol.
98 .Sh BUGS 99 .Sh BUGS
99 .Fn dlGetLibraryPath 100 .Fn dlGetLibraryPath
101 is not thread-safe on Darwin (macOS, iOS, ...) and OpenBSD.
102 .Fn dlSymsInit
103 is not thread-safe on Darwin.
104 .Fn dlGetLibraryPath
105 will not work on Haiku when the library in question doesn't have the (default)
106 .Fn _init
100 and 107 and
101 .Fn dlSymsInit 108 .Fn _fini
102 are not thread-safe on Darwin (macOS, iOS, ...). 109 symbols exported (rare, but possible).
103 .Sh SEE ALSO 110 .Sh SEE ALSO
104 .Xr dyncall 3 , 111 .Xr dyncall 3 ,
105 .Xr dyncallback 3 112 .Xr dyncallback 3
106 and the dyncall manual (available in HTML and PDF format) for more information. 113 and the dyncall manual (available in HTML and PDF format) for more information.
107 .Sh AUTHORS 114 .Sh AUTHORS