mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-10 16:00:31 +02:00
These are a Linux construct and should live here. Removes a weird passthrough API from FEXCore and keeps it in the frontend instead. This isn't even typically allocated in a real setup, as it's only a fallback for if VDSO isn't loaded. The CallbackReturn function stays in FEXCore because it would have caused an API in the other direction instead.
28 lines
807 B
C++
28 lines
807 B
C++
// SPDX-License-Identifier: MIT
|
|
#pragma once
|
|
#include <FEXCore/IR/IR.h>
|
|
#include <FEXCore/fextl/vector.h>
|
|
|
|
#include "LinuxSyscalls/Syscalls.h"
|
|
|
|
namespace FEXCore::Context {
|
|
struct VDSOSigReturn;
|
|
}
|
|
|
|
namespace FEX::VDSO {
|
|
using MapperFn = std::function<void*(void* addr, size_t length, int prot, int flags, int fd, off_t offset)>;
|
|
struct VDSOMapping {
|
|
void* VDSOBase {};
|
|
size_t VDSOSize {};
|
|
void* OptionalSigReturnMapping {};
|
|
size_t OptionalMappingSize {};
|
|
};
|
|
VDSOMapping LoadVDSOThunks(bool Is64Bit, FEX::HLE::SyscallHandler* const Handler);
|
|
void UnloadVDSOMapping(const VDSOMapping& Mapping);
|
|
|
|
uint64_t GetVSyscallEntry(const void* VDSOBase);
|
|
|
|
const std::span<FEXCore::IR::ThunkDefinition> GetVDSOThunkDefinitions();
|
|
const FEXCore::Context::VDSOSigReturn& GetVDSOSymbols();
|
|
} // namespace FEX::VDSO
|