From b9064883a275d103b6cd2da63ff839573de21e83 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 28 May 2020 20:26:02 +0200 Subject: [PATCH] OSFatal on failed find export --- relocator/src/entry.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/relocator/src/entry.cpp b/relocator/src/entry.cpp index 07fe8d9..cac3696 100644 --- a/relocator/src/entry.cpp +++ b/relocator/src/entry.cpp @@ -51,9 +51,10 @@ bool doRelocation(std::vector &relocData, relocation_trampolin_e } rplHandle = moduleCache.at(rplName); uint32_t functionAddress = 0; + OSDynLoad_FindExport(rplHandle, isData, functionName.c_str(), (void **) &functionAddress); if (functionAddress == 0) { - DEBUG_FUNCTION_LINE("Failed to find function\n"); + OSFatal_printf("Failed to find export %s of %s", functionName.c_str(), rplName.c_str()); return false; } if (!ElfUtils::elfLinkOne(curReloc.getType(), curReloc.getOffset(), curReloc.getAddend(), (uint32_t) curReloc.getDestination(), functionAddress, tramp_data, tramp_length, RELOC_TYPE_IMPORT)) {