From a091c00c00c1d5ae5e3da7ef31b98293c76d479f Mon Sep 17 00:00:00 2001 From: pants Date: Mon, 21 Sep 2026 14:16:59 -0700 Subject: init --- include/library_loader.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/library_loader.h (limited to 'include/library_loader.h') 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 + +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 */ -- cgit v1.2.3