fs-uae
fs-uae copied to clipboard
fs-uae isn't W^X safe
NetBSD similarly disallows pages to be W and X at the same time. The way to opt out of that differs from OpenBSD though (use the command paxctl +m executable.
I better solution for this is to not generated nor use the code segment at all, it's actually not needed for GCC at least. You can check if the asm code segment is supported by your compiler (clang on BSD now?), and modify the #if ?
#if defined(__GNUC__)
__asm__("fldcw %0" : : "m" (*&x87_cw));
#else
if (x87_fldcw_code) {
((x87_fldcw_function) x87_fldcw_code)();
return;
}
#endif