Files
FEX-Emu--FEX/Source/Tools/LinuxEmulation/VDSO_Emulation.h
T
Ryan Houdek c748dbf0e3 FEX: Moves sigreturn symbols to frontend
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.
2024-08-31 07:43:04 -07:00

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