How a file describes a program
A binary executable contains more than undifferentiated instructions. ELF headers identify the file type, machine, entry and tables; program headers describe construction of the runtime image.
ELF is not every system’s executable format. Linux also accepts interpreter scripts beginning with a #! line. Their text is processed by the named interpreter rather than fetched directly as processor instructions.
File layout differs from the memory image
ELF loadable segments specify offsets, virtual addresses, file sizes and memory sizes. A larger memory extent is zero-filled beyond its file bytes; those zeros need not all be stored on disk. File offsets are not runtime addresses.
A dynamically linked ELF program can name an interpreter through PT_INTERP to load required shared objects. This is a different format mechanism from a script’s first line. Platform and ABI rules determine the image rather than file length alone.
Recognition, loading and successful execution
A successful Linux execve replaces the calling process’s program image rather than inherently creating another process, and does not return to the old program. Arguments, environment and retained resources follow the interface rules.
Execute permission does not overcome an incompatible architecture, invalid format or missing interpreter. Successful loading also does not establish application correctness. File eligibility, loading and completed execution are separate states.