mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
modules: 'rebase' from byterun_with_modules, initial impl, without verification
This commit is contained in:
parent
73d3fbc388
commit
eb1ddfa447
14 changed files with 420 additions and 115 deletions
23
byterun/include/module_manager.h
Normal file
23
byterun/include/module_manager.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
struct ModSearchResult {
|
||||
size_t symbol_offset;
|
||||
uint32_t mod_id;
|
||||
Bytefile *mod_file; // = NULL => not found
|
||||
};
|
||||
|
||||
void mod_add_search_path(const char *path);
|
||||
|
||||
Bytefile *mod_get(uint32_t id);
|
||||
|
||||
int32_t find_mod_loaded(const char *name); // < 0 => not found
|
||||
|
||||
int32_t mod_load(const char *name); // < 0 => not found
|
||||
|
||||
uint32_t mod_add(Bytefile *module);
|
||||
|
||||
struct ModSearchResult mod_search_pub_symbol(const char *name);
|
||||
Loading…
Add table
Add a link
Reference in a new issue