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

查看:15
本文介绍了在 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 内部书籍的作者有一些代码展示了如何编写内核扩展来处理另一种可执行文件格式 这里.他举了两个例子:运行 Google Native Client (NaCl) ELF 应用程序和使用 Apout 运行的 PDP-11 应用程序.

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天全站免登陆