From 88da4f34905f0c98392f3ffe8ae072f58adf1a03 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 1 Jul 2018 12:56:02 +0200 Subject: [PATCH] Fix loading multiple plugins at the same time. The plugin destination in memory is not aligned by 0x100. --- loader/src/plugin/PluginLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/src/plugin/PluginLoader.cpp b/loader/src/plugin/PluginLoader.cpp index 601bf98..a547569 100644 --- a/loader/src/plugin/PluginLoader.cpp +++ b/loader/src/plugin/PluginLoader.cpp @@ -323,7 +323,7 @@ bool PluginLoader::loadAndLinkElf(PluginData * pluginData, Elf *elf, void * star } ElfTools::elfLoadSymbols(elf_ndxscn(scn), (void*) firstCurAddress, symtab, symtab_count); - curAddress = destination + shdr->sh_size; + curAddress = ROUNDUP(destination + shdr->sh_size,0x100); } } }