Remove the global trampoline table and add a small trampoline table next to each .text section instead

This commit is contained in:
Maschell
2025-01-19 10:08:14 +01:00
parent c884b17695
commit aa7eb11013
13 changed files with 252 additions and 155 deletions

View File

@@ -6,6 +6,7 @@
#include <functional>
#include <map>
#include <span>
#include <string>
class RelocationData;
@@ -15,18 +16,15 @@ class PluginContainer;
class PluginManagement {
public:
static std::vector<PluginContainer> loadPlugins(
const std::vector<PluginLoadWrapper> &pluginDataList,
std::vector<relocation_trampoline_entry_t> &trampolineData);
const std::vector<PluginLoadWrapper> &pluginDataList);
static void callInitHooks(const std::vector<PluginContainer> &plugins, const std::function<bool(const PluginContainer &)> &pred);
static bool doRelocations(const std::vector<PluginContainer> &plugins,
std::vector<relocation_trampoline_entry_t> &trampData,
std::map<std::string, OSDynLoad_Module> &usedRPls);
static bool doRelocation(const std::vector<RelocationData> &relocData,
std::vector<relocation_trampoline_entry_t> &trampData,
uint32_t trampolineID,
std::span<relocation_trampoline_entry_t> trampData,
std::map<std::string, OSDynLoad_Module> &usedRPls);
static bool DoFunctionPatches(std::vector<PluginContainer> &plugins);