Add "Relocations done" hook

This commit is contained in:
Maschell 2020-06-25 18:44:59 +02:00
parent e266969c9f
commit a9a535306b

View File

@ -45,6 +45,7 @@ typedef enum wums_hook_type_t {
WUMS_HOOK_APPLICATION_ENDS, WUMS_HOOK_APPLICATION_ENDS,
WUMS_HOOK_INIT_WUT, WUMS_HOOK_INIT_WUT,
WUMS_HOOK_FINI_WUT, WUMS_HOOK_FINI_WUT,
WUMS_HOOK_RELOCATIONS_DONE,
} wums_hook_type_t; } wums_hook_type_t;
typedef struct wums_hook_t { typedef struct wums_hook_t {
@ -56,6 +57,10 @@ typedef struct wums_app_init_args_t {
module_information_t* module_information; module_information_t* module_information;
} wums_app_init_args_t; } 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) \ #define WUMS_INITIALIZE(myargs) \
WUMS_INIT_WUT(); \ WUMS_INIT_WUT(); \
WUMS_FINI_WUT(); \ WUMS_FINI_WUT(); \
@ -73,6 +78,11 @@ typedef struct wums_app_init_args_t {
WUMS_HOOK_EX(WUMS_HOOK_APPLICATION_ENDS, __wums_end); \ WUMS_HOOK_EX(WUMS_HOOK_APPLICATION_ENDS, __wums_end); \
void __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 #ifdef __cplusplus
#define WUMS_INIT_WUT() \ #define WUMS_INIT_WUT() \
void __wums_init_wut(void);\ void __wums_init_wut(void);\