Good day, gentlemen!

The other day I had a question: what is the meaning of the so-called executable files.

What features do they have? How is created in the system? Only with compilers?

Say, for example, can an .exe file force you to work on the web server side?

I would be very grateful!

    4 answers 4

    Specification and architecture of executable files , including headers and other information.

      http://ru.wikipedia.org/wiki/ Executable_file

        The executable file for x86 systems consists of a PE header and a set of machine instructions from this table. It is automatically generated by the compiler from the program source code.

        Nothing prevents most from writing the necessary .exe file in a text / HEX editor, but in practice nobody does it because it is impossible to debug such a program.

        They are created in the system just like any other files. A hard disk is like writing to it.

        For interaction between an external program and a server, script programming languages ​​and the CGI interface are used.

        • specify that for x86 windows an executable file that contains a PE header may (but is not required to) be used. There is also COM, ELF and many others. - KoVadim

        What features do they have?

        Different operating systems have differences in executable files, except for the header, they must contain instructions of the computer's CPU on which it will be loaded, you may still need rights (and / or attributes) to start;

        How is created in the system?

        Usually, programs in high-level languages ​​are translated into “object” files containing parts of a future executable file that are collected by a special utility, the linker;

        Only with compilers?

        No, viruses can still, or are added to an existing executable image / sector, there are compression utilities for executable images, installers and other utilities working with images, but yes you need a piece of code that could be inserted, and it is obtained by compiling, very rarely can write the program directly in the codes;

        Say, for example, can an .exe file force you to work on the web server side?

        On the web server side, your image is already running, but it can be executed in a different operating environment, and even on an incompatible processor, just copying the .exe file in most cases is pointless;