在OSX上加载/执行ELF文件的可能性 [英] Possibility of loading/executing ELF files on OSX

查看:125
本文介绍了在OSX上加载/执行ELF文件的可能性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇在OSX上加载和执行elf文件的可能性.我知道标准的可执行格式是MACHO,但是NASM无法为MACHO对象生成调试信息(并且我必须使用NASM).我想这是一个很长的路,但是我不认为我可以使用ELF文件.我可以使用NASM来构建它们,但似乎甚至无法将它们与LD链接起来.

I'm just curious as to the possibility of loading and executing elf files on OSX. I know the standard executable format is MACHO, but NASM is unable to generate debug information for MACHO objects (and I am required to use NASM). I imagine its a long shot, but I don't suppose I can use ELF files. I can build them with NASM, but I can't seem to even link them with LD.

推荐答案

最好的OS X内部手册的作者提供了一些代码,这些代码显示您如何编写内核扩展来处理另一种可执行文件格式

The author of the best OS X internals book has some code showing how you'd write a kernel extension to handle another executable file format here. He gives two examples: running running Google Native Client (NaCl) ELF applications and PDP-11 apps with Apout.

我不确定该软件是否成熟.目前,它支持Leopard或更高版本.

I'm not sure how mature this software is. It currently supports Leopard and better.

这篇关于在OSX上加载/执行ELF文件的可能性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆