unmake str as submodule

This commit is contained in:
2025-03-19 21:57:27 +02:00
parent 3ecd88fe72
commit cf8b57cd57
6 changed files with 1175 additions and 14 deletions

View File

@@ -3,6 +3,7 @@
#include "logger.h"
#include "memory.h"
#include "symbols.h"
#include "types.h"
#include <assert.h>
#include <dlfcn.h>
@@ -19,6 +20,12 @@ typedef struct {
size_t capacity; // Allocated capacity
} ModuleInfos;
typedef struct {
struct sc_array_memreg *memory_regions;
} HiloadContext;
static HiloadContext context = {0};
static ModuleInfos *module_infos = 0;
// Callback function for dl_iterate_phdr
@@ -259,7 +266,11 @@ int hi_init() {
}
sc_log_set_level("DEBUG");
read_memory_maps_self();
if (read_memory_maps_self(context.memory_regions) != HILOAD_OK) {
sc_log_error("Could not populate program memory maps.\n");
return HILOAD_FAIL;
}
ModuleInfos *infos = gather_shared_libraries();
if (!infos) {