Executable
Program execution |
---|
General concepts |
Types of code |
Compilation strategies |
|
Notable runtimes |
|
Notable compilers & toolchains |
|
In
The exact interpretation depends upon the use. "Instructions" is traditionally taken to mean machine code instructions for a physical CPU.[4] In some contexts, a file containing scripting instructions (such as bytecode) may also be considered executable.
Generation of executable files
Executable files can be hand-coded in machine language, although it is far more convenient to develop software as
The high-level language is
Executable files typically also include a
Executable files thus normally contain significant additional machine code beyond that directly generated from the specific source code. In some cases, it is desirable to omit this, for example for embedded systems development, or simply to understand how compilation, linking, and loading work. In C, this can be done by omitting the usual runtime, and instead explicitly specifying a linker script, which generates the entry point and handles startup and shutdown, such as calling main
to start and returning exit status to the kernel at the end.[7]
Execution
In order to be executed by the system (such as an
e_entry
field, which specifies the (virtual) memory address at which to start execution.[9] In the GNU Compiler Collection, this field is set by the linker based on the _start
symbol.[10]See also
- Comparison of executable file formats
- Executable compression
- Executable text
References
- ISBN 1-5899-5004-6. Retrieved 2022-03-06.
- ^ "executable". Merriam-Webster's Online Dictionary. Merriam-Webster. Retrieved 2008-07-19.
- ISBN 978-0-470-04616-6. Retrieved 2023-03-06.
- ^ "Machine Instructions". GeeksforGeeks. 2015-11-03. Retrieved 2019-09-18.
- ^ "Chapter 4: Object Files". refspecs.linuxbase.org. Retrieved 2019-09-18.
- ^ Fisher, Tim. "List of Executable File Extensions". lifewire.com. Retrieved 2019-09-18.
- ^ McKellar, Jessica (2010-03-16). "Hello from a libc-free world! (Part 1)".
- .
- ^ Rusling, David A. (1999). "Chapter 4 – Processes". The Linux Kernel. sec. 4.8.1 – ELF. Retrieved 2023-03-06.
- ISBN 978-1-84882-255-9. Retrieved 2023-03-06.
External links
- EXE File Format at What Is