This is Unofficial EPICS BASE Doxygen Site
osdFindSymbol.c
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2009 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * EPICS BASE is distributed subject to a Software License Agreement found
5 * in file LICENSE that is included with this distribution.
6 \*************************************************************************/
7 /* osi/os/posix/osdFindSymbol.c */
8 
9 #include <dlfcn.h>
10 
11 #include "epicsFindSymbol.h"
12 
13 /* non-POSIX extension available on Linux (glibc at least) and OSX.
14  */
15 #ifndef RTLD_DEFAULT
16 # define RTLD_DEFAULT 0
17 #endif
18 
19 LIBCOM_API void * epicsLoadLibrary(const char *name)
20 {
21  return dlopen(name, RTLD_LAZY | RTLD_GLOBAL);
22 }
23 
24 LIBCOM_API const char *epicsLoadError(void)
25 {
26  return dlerror();
27 }
28 
29 LIBCOM_API void * epicsStdCall epicsFindSymbol(const char *name)
30 {
31  return dlsym(RTLD_DEFAULT, name);
32 }
LIBCOM_API void * epicsLoadLibrary(const char *name)
Definition: osdFindSymbol.c:13
LIBCOM_API void *epicsStdCall epicsFindSymbol(const char *name)
Definition: osdFindSymbol.c:23
#define RTLD_DEFAULT
Definition: osdFindSymbol.c:16
LIBCOM_API const char * epicsLoadError(void)
Definition: osdFindSymbol.c:18