diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /docs/nspr/reference/pr_findsymbolandlibrary.rst | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/nspr/reference/pr_findsymbolandlibrary.rst')
-rw-r--r-- | docs/nspr/reference/pr_findsymbolandlibrary.rst | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/nspr/reference/pr_findsymbolandlibrary.rst b/docs/nspr/reference/pr_findsymbolandlibrary.rst new file mode 100644 index 0000000000..0df683a76c --- /dev/null +++ b/docs/nspr/reference/pr_findsymbolandlibrary.rst @@ -0,0 +1,59 @@ +PR_FindSymbolAndLibrary +======================= + +Finds a symbol in one of the currently loaded libraries, and returns +both the symbol and the library in which it was found. + + +Syntax +------ + +.. code:: + + #include <prlink.h> + + void* PR_FindSymbolAndLibrary ( + const char *name, + PRLibrary **lib); + + +Parameters +~~~~~~~~~~ + +The function has these parameters: + +``name`` + The textual representation of the symbol to locate. +``lib`` + A reference to a location at which the runtime will store the library + in which the symbol was discovered. This location must be + pre-allocated by the caller. + + +Returns +~~~~~~~ + +If successful, returns a non-``NULL`` pointer to the found symbol, and +stores a pointer to the library in which it was found at the location +pointed to by lib. + +If the symbol could not be found, returns ``NULL``. + + +Description +----------- + +This function finds the specified symbol in one of the currently loaded +libraries. It returns the address of the symbol. Upon return, the +location pointed to by the parameter lib contains a pointer to the +library that contains that symbol. The location must be pre-allocated by +the caller. + +The function returns ``NULL`` if no such function can be found. The +order in which the known libraries are searched in not specified. This +function is equivalent to calling first :ref:`PR_LoadLibrary`, then +:ref:`PR_FindSymbol`. + +The identity returned from this function must be the target of a +:ref:`PR_UnloadLibrary` in order to return the runtime to its original +state. |