24 lines
931 B
Diff
24 lines
931 B
Diff
These are experimental fixes for running 32-bit little endian binaries on
|
|
Linux/ppc64le. While this may seem pointless, it does work, does not break
|
|
anything, and may allow enablement of things we couldn't do before (e.g.
|
|
support for box86 and thus reasonably fast emulation of 32-bit x86 games).
|
|
|
|
The first part is a signal handler fix, the second part enables the 32-bit
|
|
VDSO by removing the ppc32/big endian restriction.
|
|
|
|
Source: @eerykitty
|
|
|
|
--- a/arch/powerpc/kernel/signal_32.c
|
|
+++ b/arch/powerpc/kernel/signal_32.c
|
|
@@ -1427,8 +1427,9 @@ int handle_signal32(struct ksignal *ksig, sigset_t *oldset,
|
|
regs->gpr[3] = ksig->sig;
|
|
regs->gpr[4] = (unsigned long) sc;
|
|
regs->nip = (unsigned long) (unsigned long)ksig->ka.sa.sa_handler;
|
|
- /* enter the signal handler in big-endian mode */
|
|
+ /* enter the signal handler in native-endian mode */
|
|
regs->msr &= ~MSR_LE;
|
|
+ regs->msr |= (MSR_KERNEL & MSR_LE);
|
|
return 0;
|
|
|
|
badframe:
|