store original name for modules

This commit is contained in:
2025-05-05 00:31:56 +03:00
parent 23ccaf5895
commit 7c1145617a
5 changed files with 39 additions and 33 deletions

View File

@@ -16,8 +16,11 @@ typedef enum {
typedef u32 ModuleInfo;
typedef struct {
/// Owning. Filename for the module.
/// Filename for the module. Owning if not same as original_name;
const char *name;
/// Owning. Original filename for the module. Used to track origins for
/// patches.
const char *original_name;
/// Handle given by dlopen
void *dlhandle;
/// Start address for the module
@@ -41,4 +44,4 @@ static inline bool modinfo_has(ModuleInfo flags, ModuleFlags flag) {
#define HI_MODINFO_SET(info, flag) ((info) |= flag)
#define HI_MODINFO_CLEAR(info, flag) ((info) &= ~flag)
HiResult moduler_reload(VectorModuleData *modules, ModuleData *module);
HiResult moduler_reload(VectorModuleData *modules, size_t modindx);