Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,621
1,995
If it was possible, it would have been done by now. And yet, I'm suddenly itching to try this, even if it's likely go nowhere. :)

Does anyone know why moving the translate binary and related libraries over to 10.7 doesn't "just work"? Contrary to popular belief, OS X has pretty good backwards compatibility, so I'm surprised that it completely fails. I recall reading somewhere that Rosetta support was removed from the kernel, but the kernel (1) is completely open source, (2) doesn't change all that much between releases, and (3) is extremely easy to recompile. If it's just a matter of putting some removed functionality back in, I think I could do that, with a little time and trial-and-error.

Are there any resources on what has been tried in the past? I seem to remember reading extensive threads on past efforts, but I was doing some Googling today and didn't turn up much. There's https://www.insanelymac.com/forum/topic/262890-installing-rosetta-on-lion/ but it looks like everyone gave up super quickly.

Basically, I'd like to waste as little time as possible by not exploring the same avenues as anyone else. If anyone can find any resources, it would be super helpful!
 
Last edited:

f54da

macrumors 6502
Dec 22, 2021
393
141
Interesting question: 10.6 xnu does have special support for rosetta, namely in kern_exec where it seems to set some special ppc environment bits if the oah binary is invoked (and of course there's the handler to call the oah binary for a ppc mach-o, but the former is more important for minimal viable example since you can always invoke oah manually). I think this bit is actually needed because the kernel has other codepath here when allocating memory. (Not 100% confident though, bit it makes sense there are different conventions about base address, region sizes, etc.)

Likely might need changes to dyld also for obvious reasons, but that's open source as well https://opensource.apple.com/source/dyld/dyld-132.13/src/dyld.cpp

Would be easiest to try getting a plain assembly hello world ppc binary working first. I see that someone on your linked thread tried copying translate binary but it crashed even without args; tracing in lldb would be the logical next step but seems he never followed up on that...

Another thing which I'm not sure of is whether rosetta relies on existence of ppc-arch system frameworks; I'd assume not since they'd want to do high-level thunking here for performance, but maybe that only ends up being done in some cases? I couldn't find any docs on reverse engineering rosetta1m or if they exist they've disappeared.
 
Last edited:
  • Like
Reactions: Wowfunhappy
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.