From 5bdf0d6b04b21f237bda32910d7eec79e949f7cf Mon Sep 17 00:00:00 2001 From: maxjivi05 Date: Mon, 26 Oct 2026 12:24:07 -0400 Subject: [PATCH] fix(fex): report the x86 platform under AT_PLATFORM --- tools/fex/patches/0004-auxv-at-platform.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/fex/patches/0004-auxv-at-platform.patch diff --git a/tools/fex/patches/0004-auxv-at-platform.patch b/tools/fex/patches/0004-auxv-at-platform.patch new file mode 100644 index 000000000..f8b2de587 --- /dev/null +++ b/tools/fex/patches/0004-auxv-at-platform.patch @@ -0,0 +1,12 @@ +diff --git a/Source/Tools/FEXInterpreter/ELFCodeLoader.h b/Source/Tools/FEXInterpreter/ELFCodeLoader.h +--- a/Source/Tools/FEXInterpreter/ELFCodeLoader.h ++++ b/Source/Tools/FEXInterpreter/ELFCodeLoader.h +@@ -640,7 +640,7 @@ + AuxVariables.emplace_back(auxv_t {16, HWCap}); // AT_HWCAP + AuxVariables.emplace_back(auxv_t {26, HWCap2}); // AT_HWCAP2 + AuxVariables.emplace_back(auxv_t {51, CalculateSignalStackSize()}); // AT_MINSIGSTKSZ +- AuxPlatform = &AuxVariables.emplace_back(auxv_t {24, ~0ULL}); // AT_PLATFORM ++ AuxPlatform = &AuxVariables.emplace_back(auxv_t {15, ~0ULL}); // AT_PLATFORM + AuxExecFN = &AuxVariables.emplace_back(auxv_t {AT_EXECFN, ~0ULL}); // AT_EXECFN + + if (Is64BitMode()) {