How to run aout on linux?

让人想犯罪 __ 提交于 2019-12-09 03:18:59

问题


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. 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. 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.

P.S. I know that writing user-space launcher for aout static binary is quite trivial but the question is about some existing solution.


回答1:


Check for CONFIG_BINFMT_AOUT in your kernel config.

If your kernel has /proc/config.gz:

zgrep CONFIG_BINFMT_AOUT /proc/config.gz

On Ubuntu and the like:

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



回答2:


Kernel option was CONFIG_BINFMT_AOUT, not sure if it's still around or necessary.



来源:https://stackoverflow.com/questions/4883984/how-to-run-aout-on-linux

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!