diff options
| author | pants <niklasjo2004@gmail.com> | 2026-09-21 14:16:59 -0700 |
|---|---|---|
| committer | pants <niklasjo2004@gmail.com> | 2026-09-21 14:16:59 -0700 |
| commit | a091c00c00c1d5ae5e3da7ef31b98293c76d479f (patch) | |
| tree | 62c4b3bc114faac9922873ae48672c46cc2cf7d4 /include/library_loader.h | |
Diffstat (limited to 'include/library_loader.h')
| -rw-r--r-- | include/library_loader.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/library_loader.h b/include/library_loader.h new file mode 100644 index 0000000..47bc9f0 --- /dev/null +++ b/include/library_loader.h @@ -0,0 +1,17 @@ +#ifndef GSR_LIBRARY_LOADER_H +#define GSR_LIBRARY_LOADER_H + +#include <stdbool.h> + +typedef struct { + void **func; + const char *name; +} dlsym_assign; + +void* dlsym_print_fail(void *handle, const char *name, bool required); +/* |dlsyms| should be null terminated */ +bool dlsym_load_list(void *handle, const dlsym_assign *dlsyms); +/* |dlsyms| should be null terminated */ +void dlsym_load_list_optional(void *handle, const dlsym_assign *dlsyms); + +#endif /* GSR_LIBRARY_LOADER_H */ |
