What's the difference or purpose of a file format like ELF when flat binaries take up less space and can do the same thing?

Posted by Sinister Clock on Programmers See other posts from Programmers or by Sinister Clock
Published on 2013-06-26T22:31:59Z Indexed on 2013/06/27 4:30 UTC
Read the original article Hit count: 237

Filed under:

I will give a better description now.

In Linux driver development you need to follow a specification using an ELF file format as a finalized executable, i.e., that right there is not flat, it has headers, entry fields, and is basically carrying more weight than just a flat binary with opcodes.

What is the purpose or in-depth difference of a Linux ELF file for a driver to interact with the video hardware, and, say, a bare, flat x86 16-bit binary I write that makes use of emulated graphics mode on a graphics card and writes to memory(besides the fact that the Linux driver probably is specific to making full use of the hardware and not just the emulated, backwards compatible memory accessing scheme).

To sum it up, what is a difference or purpose of a binary like ELF with different headers and settings and just a flat binary with the necessary opcodes/instructions/data to do the same thing, just without any specific format?

Example: Windows uses PE, Mac uses Mach-O/PEF, Linux uses ELF/FATELF, Unix uses COFF.

What do any of them really mean or designate if you can just go flat, especially with a device driver which is system software.

© Programmers or respective owner

Related posts about kernel