aboutsummaryrefslogtreecommitdiff
path: root/include/library_loader.h
blob: 47bc9f095a20faa5e8d9ab28c977bf11fe016fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 */