Allow exports with custom name

This commit is contained in:
Maschell 2023-11-12 12:59:50 +01:00
parent 004f7f76e8
commit f0dbd47aad
1 changed files with 4 additions and 2 deletions

View File

@ -42,8 +42,10 @@ typedef struct wums_entry_t {
const void *address; /* pointer to the export */
} wums_loader_entry_t;
#define WUMS_EXPORT_FUNCTION(function) WUMS_EXPORT(WUMS_FUNCTION_EXPORT, function, function)
#define WUMS_EXPORT_DATA(pointer) WUMS_EXPORT(WUMS_DATA_EXPORT, pointer, &pointer)
#define WUMS_EXPORT_FUNCTION_EX(function, name) WUMS_EXPORT(WUMS_FUNCTION_EXPORT, name, function)
#define WUMS_EXPORT_FUNCTION(function) WUMS_EXPORT_FUNCTION_EX(function, function)
#define WUMS_EXPORT_DATA_EX(pointer, name) WUMS_EXPORT(WUMS_DATA_EXPORT, name, &pointer)
#define WUMS_EXPORT_DATA(pointer) WUMS_EXPORT_DATA_EX(pointer, pointer)
#define WUMS_EXPORT(_type, pointer, value) \
extern const wums_loader_entry_t wums_entry_##pointer \