From db29f7a3028843f120d37aacb1e83e5c2c26e5f1 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 11 Feb 2018 03:24:32 +0100 Subject: [PATCH] [Loader] Only load plugin if no more relocations are needed. --- loader/src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/loader/src/main.cpp b/loader/src/main.cpp index 519659b..20706c3 100644 --- a/loader/src/main.cpp +++ b/loader/src/main.cpp @@ -57,6 +57,12 @@ extern "C" int Menu_Main(int argc, char **argv){ if(isFirstBoot){ memset((void*)&gbl_replacement_data,0,sizeof(gbl_replacement_data)); loadSamplePlugin(); + + } + + if(module_relocations_count != 0){ + DEBUG_FUNCTION_LINE("We still have undefined symbol. Make sure to link them in =/ Exiting\n"); + return EXIT_SUCCESS; } @@ -171,6 +177,7 @@ void loadSamplePlugin(){ if(module_relocations_count != 0){ DEBUG_FUNCTION_LINE("We still have undefined symbol. Make sure to link them in =/ Exiting\n"); + return; } DEBUG_FUNCTION_LINE("Printing some information before replacing the functions\n");