Why does a binary of one OS (Windows) does not run in other ( Linux) for same underlying architecture? [closed]

只愿长相守 提交于 2019-11-27 08:31:04

问题


It may be a trivial question but I have hard time to explain to my little brother that a Windows binary will not run in another different OS like Linux even when both the OS are running in the same machine. If the binaries (opcodes) have to be same to execute in the same underlying architecture ( say Intel 32-bit), what are the differences between the binaries of Windows and Linux ( or even Ubuntu and RadHat Linux)? Are there any runtime modification of the binaries at instruction level before execution by the processor? How do I explain in lay man /simple terms that he can understand.


回答1:


The different operating systems have different ABIs which require different loaders to use. If the loader for the other OS is available (via, say, Wine) then it is possible to load the executable, at which point the API becomes important.



来源:https://stackoverflow.com/questions/16661454/why-does-a-binary-of-one-os-windows-does-not-run-in-other-linux-for-same-un

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