잡담

Why are “Executable files” operating system dependent?

tomato13 2013. 5. 2. 12:20

http://stackoverflow.com/questions/5477483/why-are-executable-files-operating-system-dependent

http://en.wikipedia.org/wiki/Loader_(computing)


Suddenly, I thought why windows exe file can't be executed on a linux. 

( As you know, suppose that both have same x86 processor. )


The process loaders included in each os are different. And those loaders works differently. 

( So, I guess that exe file may not be a real native x86 machine code in fact. )


and the loader connects system call and other libraries by such as dynamic linking. 


Think... when you include header files such as stdio.h, only header file is included in the executable file. And, the real function of the header file should be called when executing your executable file. When are those functions called? Maybe, I think the process loader is in charge of it.