mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-16 08:58:24 +01:00
Fix build
This commit is contained in:
parent
1785ae6eaf
commit
b9cd9ae6c2
26 changed files with 1544 additions and 109 deletions
32
overlay_experimental/linux/Linux_Detour.h
Normal file
32
overlay_experimental/linux/Linux_Detour.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#ifndef LINUX_DETOUR_H
|
||||
#define LINUX_DETOUR_H
|
||||
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <thread>
|
||||
|
||||
class Linux_Detour
|
||||
{
|
||||
public:
|
||||
static int update_thread(pthread_t thread_id);
|
||||
static int transaction_begin();
|
||||
static int transaction_abort();
|
||||
static int transaction_commit();
|
||||
static int hook_func(void** ppOriginalFunc, void* _hook);
|
||||
static int unhook_func(void** ppOriginalFunc, void* _hook);
|
||||
|
||||
private:
|
||||
static int hook_func_abs(void** ppOriginalFunc, void* _hook);
|
||||
static int hook_func_rel(void** ppOriginalFunc, void* _hook);
|
||||
|
||||
Linux_Detour() = delete;
|
||||
Linux_Detour(Linux_Detour const&) = delete;
|
||||
Linux_Detour(Linux_Detour &&) = delete;
|
||||
Linux_Detour& operator=(Linux_Detour const&) = delete;
|
||||
Linux_Detour& operator=(Linux_Detour &&) = delete;
|
||||
};
|
||||
|
||||
extern "C" void *elf_hook(char const *library_filename, void const *library_address, char const *function_name, void const *substitution_address);
|
||||
|
||||
#endif // LINUX_DETOUR_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue