unmake str as submodule
This commit is contained in:
13
src/hiload.c
13
src/hiload.c
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user