Re:About the Rosetta Translation Environment
by himinlomax on Tuesday June 23, 2020 @02:26PM
(#23618111)
> If executable code is being generated at runtime, it's going to be x86_64 binary machine code still
JITs have to explicitly make the memory they write the generated code to executable. The OS "just" needs to fail to actually make the page executable, and then handle the subsequent page fault by transpiling or interpreting the x86 code therein.
Re:About the Rosetta Translation Environment
by anyfoo on Tuesday June 23, 2020 @06:06PM
(#23620976)
And it wouldn't make sense to make any x86 process originating pages actually executable on a page table level anyway, as the CPU can never actually "execute" it, as machine code.
JITs have to explicitly make the memory they write the generated code to executable. The OS "just" needs to fail to actually make the page executable, and then handle the subsequent page fault by transpiling or interpreting the x86 code therein.