gather information about module.. again

This commit is contained in:
2025-04-14 00:56:41 +03:00
parent 5beac7bdd8
commit 54b9ec7404
10 changed files with 212 additions and 35 deletions

31
src/moduler/moduler.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef MODULER_H_
#define MODULER_H_
#include "array/array.h"
#include "memory.h"
#include "symbols.h"
#include "types.h"
struct HiloadContext;
sc_array_def(uptr, uptr);
enum HiModuleState {
HI_MODULE_STATE_CLEAN = 0,
HI_MODULE_STATE_DIRTY,
};
typedef struct {
struct sc_array_str names; // Array of library names
struct sc_array_ptr handles; // Array of library handles
struct sc_array_uptr addresses; // Array of library base addresses
struct sc_array_syms symbols; // Symbol info for modules
u8 state[256]; // Flag for when module needs to be changed
size_t count; // Number of modules
} ModuleInfos;
HiloadResult moduler_reload(ModuleInfos *modinfos,
const struct sc_array_memreg *const memregs,
int modindex);
#endif // MODULER_H_