diff --git a/relocator/src/ModuleDataPersistence.cpp b/relocator/src/ModuleDataPersistence.cpp index 5b09178..c707d40 100644 --- a/relocator/src/ModuleDataPersistence.cpp +++ b/relocator/src/ModuleDataPersistence.cpp @@ -4,6 +4,7 @@ #include "../../source/module/ModuleData.h" #include "../../source/module/RelocationData.h" #include +#include std::vector ModuleDataPersistence::loadModuleData(module_information_t *moduleInformation) { std::vector result; @@ -34,6 +35,14 @@ std::vector ModuleDataPersistence::loadModuleData(module_information moduleData.setExportName(module_data->module_export_name); + + for (uint32_t j = 0; j < EXPORT_ENTRY_LIST_LENGTH; j++) { + export_data_t *export_entry = &(module_data->export_entries[j]); + if (export_entry->address == NULL) { + continue; + } + moduleData.addExportData(ExportData(static_cast(export_entry->type), export_entry->name, reinterpret_cast(export_entry->address))); + } for (uint32_t j = 0; j < DYN_LINK_RELOCATION_LIST_LENGTH; j++) { dyn_linking_relocation_entry_t *linking_entry = &(module_data->linking_entries[j]); if (linking_entry->destination == NULL) {