Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question for Programmers and the Like
#11
Spaz Wrote:1. A Windows .exe file or a Linux executable file do not just contain CPU instructions. They can also contain metadata such as the program version and program author. They also contain initialized global data and the initial memory layout of the program. See the Wikipedia article on Object File for more. Windows uses the Portable Executable (PE) format while Linux uses the Executable and Linkable Format (ELF). There is a part of an operating system called a loader that takes that executable format and sets up the program in memory before handing the program to the CPU.

2. For a program to do anything useful, it will need to use some system calls, functions that are executed by the operating system. Programs (aside from operating systems and device drivers) are not given direct access to devices like the hard drive. Instead they must ask the operating system to open a file and write these 200 bytes. Windows and Linux have different functions for opening and writing to files.


If I were an Operating System developer, I would want my operating system to run programs more effectively than the current status-quo and I would want it to run existing software to make transitions easier. Why does Linux not use PE format when the file ends in .exe? Are there developmental limitations, legal restrictions, or something else altogether?

Or for that matter, why bother using ELF and different function names at all? Legal issues? I could go on and ask about Windows exclusive things like the .NET Framework, ActiveX, and DirectX, but the thread is starting to diverge. Sad


Where does one learn this kind of stuff? "Computer Science in college" is probably the answer, but much too vague to be even remotely helpful.
Reply


Messages In This Thread
Question for Programmers and the Like - by Khoi - 2010-10-29, 01:51 PM
Question for Programmers and the Like - by larmie - 2010-10-29, 02:06 PM
Question for Programmers and the Like - by Spaz - 2010-10-29, 03:34 PM
Question for Programmers and the Like - by Hazzy - 2010-10-29, 03:49 PM
Question for Programmers and the Like - by Fiel - 2010-10-29, 04:02 PM
Question for Programmers and the Like - by Spaz - 2010-10-29, 04:45 PM
Question for Programmers and the Like - by Nikkey - 2010-10-29, 05:23 PM
Question for Programmers and the Like - by Hazzy - 2010-10-29, 07:44 PM
Question for Programmers and the Like - by Eos - 2010-10-29, 09:56 PM
Question for Programmers and the Like - by Spaz - 2010-10-29, 10:28 PM
Question for Programmers and the Like - by Eos - 2010-10-29, 10:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)