MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / module_resolve_symbol

Function module_resolve_symbol

TactilityKernel/source/module.cpp:93–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93bool module_resolve_symbol(Module* module, const char* symbol_name, uintptr_t* symbol_address) {
94 if (!module_is_started(module)) return false;
95 auto* symbol_ptr = module->symbols;
96 if (symbol_ptr == nullptr) return false;
97 while (symbol_ptr->name != nullptr) {
98 if (strcmp(symbol_ptr->name, symbol_name) == 0) {
99 *symbol_address = reinterpret_cast<uintptr_t>(symbol_ptr->symbol);
100 return true;
101 }
102 symbol_ptr++;
103 }
104 return false;
105}
106
107bool module_resolve_symbol_global(const char* symbol_name, uintptr_t* symbol_address) {
108 mutex_lock(&ledger.mutex);

Callers 1

Calls 1

module_is_startedFunction · 0.85

Tested by

no test coverage detected