I’m currently learning C++ and there are some (basic) things which I don’t really know about and where I didn’t find anything useful over different search engines.
-
Well as all operating systems have different “binary formats” for their executeables (Windows/Linux/Mac) – what are the differences? I mean all of them are binary but is there anything (beside all the OS APIs) that really differs?
-
(Windows) This is a dumb question – but are all the applications there really just binary (and I mean just 0’s and 1’s)? In which format are they stored? (As you don’t see 0’s and 1’s in all the Text editors but mainly non-displayable characters)
Best regards,
lamas
Executable file formats for Windows (PE), Linux (ELF), OS/X etc (MACH-O), tend to be designed to solve common problems, so they all share common features. However, each platform specifies a different standard, so the files are not compatible across platforms, even if the platforms use the same type of CPU.
Executable file formats are not only used for executable files, but also libraries, which also contain code but are never run directly by the user – only loaded into memory to satisfy the needs to directly executable binaries.
Common Features of an executable file format:
It’s interesting to compare such formats to more basic formats, such as the venerable DOS
.comfile, which simply describes 64K of assorted ‘stuff’ to be loaded at the next available location, and has few of the features listed above.Binary in this sense is used to compare them to ‘source’ files, which are written in text format. Binary format simply says that they are encoded in a non-text way, and doesn’t really relate to the 0-and-1 sense of binary.