mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-10 01:00:18 +02:00
Ubuntu soft links a bunch of binaries in /usr/bin to softlinks that live in /etc/alternatives/ When hitting any of these alternative softlinks execve would fail if the host also didn't have the same softlink paths. Allows us to correctly follow the symlinks on execve as well which fixes launching wine directly from the wine symlink. Alternatively you could have launched /usr/bin/wine-stable directly. Also fixes FEX strace again.
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
/*
|
|
$info$
|
|
tags: LinuxSyscalls|syscalls-x86-64
|
|
$end_info$
|
|
*/
|
|
|
|
#include <FEXCore/Utils/LogManager.h>
|
|
#include "Tests/LinuxSyscalls/Syscalls.h"
|
|
#include "Tests/LinuxSyscalls/x64/Syscalls.h"
|
|
|
|
#include <errno.h>
|
|
#include <stdint.h>
|
|
|
|
namespace FEXCore::Core {
|
|
struct CpuStateFrame;
|
|
}
|
|
|
|
namespace FEX::HLE::x64 {
|
|
#define REGISTER_SYSCALL_NOT_IMPL_X64(name) REGISTER_SYSCALL_IMPL_X64(name, [](FEXCore::Core::CpuStateFrame *Frame) -> uint64_t { \
|
|
LogMan::Msg::D("Using deprecated/removed syscall: " #name); \
|
|
return -ENOSYS; \
|
|
});
|
|
#define REGISTER_SYSCALL_NO_PERM_X64(name) REGISTER_SYSCALL_IMPL_X64(name, [](FEXCore::Core::CpuStateFrame *Frame) -> uint64_t { \
|
|
return -EPERM; \
|
|
});
|
|
|
|
// these are removed/not implemented in the linux kernel we present
|
|
void RegisterNotImplemented() {
|
|
REGISTER_SYSCALL_NOT_IMPL_X64(tuxcall);
|
|
REGISTER_SYSCALL_NOT_IMPL_X64(security);
|
|
REGISTER_SYSCALL_NOT_IMPL_X64(set_thread_area);
|
|
REGISTER_SYSCALL_NOT_IMPL_X64(get_thread_area);
|
|
REGISTER_SYSCALL_NOT_IMPL_X64(epoll_ctl_old);
|
|
REGISTER_SYSCALL_NOT_IMPL_X64(epoll_wait_old);
|
|
REGISTER_SYSCALL_NO_PERM_X64(kexec_file_load);
|
|
}
|
|
}
|