use sc_arrays for data

This commit is contained in:
Kasper Sauramo
2025-03-20 19:00:36 +02:00
parent 32c7d794f1
commit 5bcff694f7
3 changed files with 68 additions and 101 deletions

View File

@@ -26,12 +26,12 @@ add_ptr_offset_if_invalid(uptr p, uptr offset,
* Will clear and free the given SymbolInfo struct. Allocates enough memory to
* hold found symbols.
*/
CreateResult hi_create_symbol_info(SymbolInfos *symbols,
HiloadResult hi_create_symbol_info(SymbolInfos *symbols,
struct sc_array_memreg *const regions,
struct dl_phdr_info *info) {
if (!symbols)
return CREATE_FAILED;
return HILOAD_FAIL;
hi_free_symbol_info(symbols);
@@ -86,7 +86,7 @@ CreateResult hi_create_symbol_info(SymbolInfos *symbols,
if (!strtab || !symtab || strtab_size == 0 || symtab_size == 0) {
sc_log_error("Failed to find symbol or string table in %s\n",
info->dlpi_name);
return CREATE_FAILED;
return HILOAD_FAIL;
}
// Iterate over the symbol table
@@ -104,7 +104,7 @@ CreateResult hi_create_symbol_info(SymbolInfos *symbols,
}
}
return CREATE_SUCCESS;
return HILOAD_OK;
}
void hi_free_symbol_info(SymbolInfos *symbols) {