This commit is contained in:
2025-03-18 14:19:32 +02:00
parent db4b51ab2d
commit 97c5ff206a
4 changed files with 33 additions and 31 deletions

View File

@@ -7,16 +7,18 @@ extern "C" {
// Return codes for reload_module
typedef enum {
RELOAD_SUCCESS = 0,
RELOAD_NOT_FOUND,
RELOAD_CLOSE_ERROR,
RELOAD_OPEN_ERROR
HI_RELOAD_SUCCESS = 0,
HI_RELOAD_NOT_FOUND,
HI_RELOAD_CLOSE_ERROR,
HI_RELOAD_OPEN_ERROR
} ReloadResult;
int he_init();
void he_deinit();
void he_print_module_infos();
ReloadResult he_reload_module(const char *module_name);
/* Initialiez the module. Must be called before anything else */
int hi_init();
/* Frees memory and cleans up */
void hi_deinit();
void hi_print_module_infos();
ReloadResult hi_reload_module(const char *module_name);
#ifdef __cplusplus
}

View File

@@ -1,22 +0,0 @@
#ifndef SYMBOLS_H_
#define SYMBOLS_H_
#include <link.h>
#include <stddef.h>
#include <stdint.h>
typedef struct {
char **names;
void **addresses;
size_t count;
size_t capacity;
} SymbolInfos;
typedef enum { CREATE_SUCCESS = 0, CREATE_FAILED } CreateResult;
struct dl_phdr_info;
CreateResult he_create_symbol_info(SymbolInfos *, struct dl_phdr_info *);
void he_free_symbol_info(SymbolInfos *);
#endif // SYMBOLS_H_