简体   繁体   English

如何在linux上运行aout?

[英]How to run aout on linux?

The question is how to execute aout-format binary (I mean old format which for example used on FreeBSD before it has migrated to ELF) on Linux system. 问题是如何在Linux系统上执行aout-format二进制文件(我的意思是旧格式,例如在FreeBSD迁移到ELF之前使用它)。 Is there a possibility to do so without extra coding (is there some existing solution)? 是否有可能在没有额外编码的情况下这样做(是否有一些现有的解决方案)? Probably it should be in form of kernel module or patch for the Linux kernel. 可能它应该是Linux内核的内核模块或补丁的形式。 Another solution could be user-space launcher (may be even run-time linker). 另一种解决方案可以是用户空间启动器(甚至可以是运行时链接器)。 I have searched for something similar but was unable to found something. 我搜索过类似的东西,却找不到东西。 I have not yet checked difference in system calls interfaces, if you have some comments about that, you are welcome to provide them. 我还没有检查系统调用接口的区别,如果你对此有一些评论,欢迎你提供它们。

PS I know that writing user-space launcher for aout static binary is quite trivial but the question is about some existing solution. PS我知道为非静态二进制文件编写用户空间启动程序是非常简单的,但问题是关于一些现有的解决方案。

Check for CONFIG_BINFMT_AOUT in your kernel config. 检查内核配置中的CONFIG_BINFMT_AOUT。

If your kernel has /proc/config.gz: 如果你的内核有/proc/config.gz:

zgrep CONFIG_BINFMT_AOUT /proc/config.gz

On Ubuntu and the like: 在Ubuntu等上:

grep CONFIG_BINFMT_AOUT /boot/config-$(uname -r)

内核选项是CONFIG_BINFMT_AOUT,不确定它是否仍然存在或是必要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM