Add "Relocations done" hook

This commit is contained in:
Maschell 2020-06-25 18:44:59 +02:00
parent e266969c9f
commit a9a535306b
1 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,7 @@ typedef enum wums_hook_type_t {
WUMS_HOOK_APPLICATION_ENDS,
WUMS_HOOK_INIT_WUT,
WUMS_HOOK_FINI_WUT,
WUMS_HOOK_RELOCATIONS_DONE,
} wums_hook_type_t;
typedef struct wums_hook_t {
@ -56,6 +57,10 @@ typedef struct wums_app_init_args_t {
module_information_t* module_information;
} wums_app_init_args_t;
typedef struct wums_relocs_done_args_t {
module_information_t* module_information;
} wums_relocs_done_args_t;
#define WUMS_INITIALIZE(myargs) \
WUMS_INIT_WUT(); \
WUMS_FINI_WUT(); \
@ -72,6 +77,11 @@ typedef struct wums_app_init_args_t {
void __wums_end(void);\
WUMS_HOOK_EX(WUMS_HOOK_APPLICATION_ENDS, __wums_end); \
void __wums_end()
#define WUMS_RELOCATIONS_DONE(myargs) \
void __wums_relocations_done(wums_relocs_done_args_t);\
WUMS_HOOK_EX(WUMS_HOOK_RELOCATIONS_DONE, __wums_relocations_done); \
void __wums_relocations_done(wums_relocs_done_args_t myargs)
#ifdef __cplusplus
#define WUMS_INIT_WUT() \