364:
557:
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,
588:(ABI). In simple interfaces, a file is executed by loading it into memory and jumping to the start of the address space and executing from there. In more complicated interfaces, executable files have additional metadata specifying a separate
558:
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
538:, calling static constructors and destructors, etc.) and interactions with the operating system, notably passing arguments, environment, and returning an
1114:
350:
1083:
960:
907:
723:
613:
30:
This article is about a general type of computer file. For the specific file type used in some operating systems, see
658:
1045:
899:
184:
464:
Executable files can be hand-coded in machine language, although it is far more convenient to develop software as
343:
1109:
1015:
500:
420:
511:-specific. This gives structure to the generated machine code, for example dividing it into sections such as
228:
585:
384:
277:
1060:
85:
17:
711:
Windows
Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000
336:
238:
932:
795:
1050:
953:
834:
476:
instead, which remains human-readable while being closely associated with machine code instructions.
201:
172:
101:
496:
256:
178:
597:
443:
432:
309:
234:
113:
820:
618:
324:
283:
61:
893:
644:
709:
438:
The exact interpretation depends upon the use. "Instructions" is traditionally taken to mean
206:
189:
91:
42:
946:
770:
715:
262:
472:
that can be easily understood by humans. In some cases, source code might be specified in
8:
1055:
839:
550:
object, which contains the actual entry point and does setup and shutdown by calling the
504:
495:
to create the executable. Object files -- executable or not -- are typically stored in a
469:
78:
596:
field, which specifies the (virtual) memory address at which to start execution. In the
680:
535:
492:
745:
1035:
938:
903:
719:
654:
542:, together with other startup and shutdown features such as releasing resources like
473:
990:
848:
571:
508:
424:
396:
56:
1000:
867:
688:
623:
551:
531:
222:
118:
487:
of some sort; the equivalent process on assembly language source code is called
1040:
527:
483:
into either an executable machine code file or a non-executable machine code –
196:
96:
1103:
1065:
439:
376:
151:
71:
363:
973:
589:
581:
543:
539:
484:
465:
459:
380:
379:
of the first byte in the second column, which comprises bytes of data in
292:
273:
141:
136:
852:
1025:
446:. In some contexts, a file containing scripting instructions (such as
419:, causes a computer "to perform indicated tasks according to encoded
372:
156:
1005:
837:; Nair, Ravi (2005-05-16). "The Architecture of Virtual Machines".
650:
576:
480:
447:
368:
146:
66:
592:. For example, in ELF, the entry point is defined in the header's
520:
287:
243:
1030:
428:
268:
27:
A file that causes a computer to follow indicated instructions
1070:
1010:
985:
562:
to start and returning exit status to the kernel at the end.
516:
512:
388:
319:
1088:
1020:
995:
547:
315:
252:
247:
31:
387:
first), and the last column consists of the corresponding
968:
530:, which implements runtime language features (such as
584:), an executable file must conform to the system's
570:In order to be executed by the system (such as an
895:A Practical Introduction to Computer Architecture
523:(read-only data, such as constants and strings).
453:
1101:
600:, this field is set by the linker based on the
519:(initialized global and static variables), and
954:
344:
827:
812:
859:
701:
961:
947:
787:
636:
526:Executable files typically also include a
351:
337:
885:
833:
821:"Hello from a libc-free world! (Part 1)"
818:
546:. For C, this is done by linking in the
362:
865:
738:
707:
14:
1102:
763:
673:
642:
942:
614:Comparison of executable file formats
450:) may also be considered executable.
411:, sometimes simply referred to as an
375:loader. The first column consists of
891:
796:"List of Executable File Extensions"
1115:Programming language implementation
685:Merriam-Webster's Online Dictionary
24:
793:
302:Notable compilers & toolchains
25:
1126:
926:
819:McKellar, Jessica (2010-03-16).
900:Springer Science+Business Media
501:Executable and Linkable Format
454:Generation of executable files
13:
1:
629:
586:application binary interface
565:
442:instructions for a physical
259:target-specific initializer)
7:
708:Mueller, John Paul (2007).
607:
491:. Several object files are
479:The high-level language is
86:Intermediate representation
10:
1131:
866:Rusling, David A. (1999).
457:
427:that must be interpreted (
29:
1079:
981:
771:"Chapter 4: Object Files"
653:. pp. 108, 187–188.
646:Embedded FreeBSD Cookbook
868:"Chapter 4 – Processes"
598:GNU Compiler Collection
310:GNU Compiler Collection
235:Common Language Runtime
775:refspecs.linuxbase.org
746:"Machine Instructions"
619:Executable compression
392:
385:least significant byte
165:Compilation strategies
1110:Computer file systems
1084:Comparison of formats
892:Page, Daniel (2009).
716:John Wiley & Sons
643:Celovi, Paul (2002).
366:
190:Compile and go system
902:. pp. 415–416.
263:Java virtual machine
185:Tracing just-in-time
853:10.1109/MC.2005.173
515:(executable code),
505:Portable Executable
470:high-level language
435:to be functional.
423:", as opposed to a
79:Optimizing compiler
874:. sec. 4.8.1 – ELF
536:exception handling
409:executable program
393:
1097:
1096:
909:978-1-84882-255-9
725:978-0-470-04616-6
474:assembly language
371:of an executable
361:
360:
43:Program execution
16:(Redirected from
1122:
963:
956:
949:
940:
939:
920:
919:
917:
916:
889:
883:
882:
880:
879:
872:The Linux Kernel
863:
857:
856:
831:
825:
824:
816:
810:
809:
807:
806:
791:
785:
784:
782:
781:
767:
761:
760:
758:
757:
742:
736:
735:
733:
732:
705:
699:
698:
696:
695:
677:
671:
670:
668:
667:
640:
603:
595:
579:
572:operating system
561:
509:operating system
497:container format
397:computer science
353:
346:
339:
215:Notable runtimes
202:Transcompilation
49:General concepts
39:
38:
21:
1130:
1129:
1125:
1124:
1123:
1121:
1120:
1119:
1100:
1099:
1098:
1093:
1075:
977:
967:
933:EXE File Format
929:
924:
923:
914:
912:
910:
890:
886:
877:
875:
864:
860:
835:Smith, James E.
832:
828:
817:
813:
804:
802:
792:
788:
779:
777:
769:
768:
764:
755:
753:
744:
743:
739:
730:
728:
726:
706:
702:
693:
691:
689:Merriam-Webster
679:
678:
674:
665:
663:
661:
641:
637:
632:
624:Executable text
610:
601:
593:
575:
568:
559:
552:runtime library
532:task scheduling
462:
456:
405:executable file
401:executable code
357:
237:(CLR) and
223:Android Runtime
119:Virtual machine
35:
28:
23:
22:
15:
12:
11:
5:
1128:
1118:
1117:
1112:
1095:
1094:
1092:
1091:
1086:
1080:
1077:
1076:
1074:
1073:
1068:
1063:
1058:
1053:
1048:
1043:
1038:
1033:
1028:
1023:
1018:
1013:
1008:
1003:
998:
993:
988:
982:
979:
978:
966:
965:
958:
951:
943:
937:
936:
928:
927:External links
925:
922:
921:
908:
884:
858:
826:
811:
786:
762:
737:
724:
718:. p. 24.
700:
672:
659:
634:
633:
631:
628:
627:
626:
621:
616:
609:
606:
567:
564:
528:runtime system
507:(PE) which is
455:
452:
359:
358:
356:
355:
348:
341:
333:
330:
329:
328:
327:
322:
313:
304:
303:
299:
298:
297:
296:
290:
281:
271:
266:
260:
250:
241:
232:
226:
217:
216:
212:
211:
210:
209:
204:
199:
197:Precompilation
194:
193:
192:
187:
176:
167:
166:
162:
161:
160:
159:
154:
149:
144:
139:
131:
130:
126:
125:
124:
123:
122:
121:
116:
111:
106:
105:
104:
97:Runtime system
89:
83:
82:
81:
76:
75:
74:
59:
51:
50:
46:
45:
26:
9:
6:
4:
3:
2:
1127:
1116:
1113:
1111:
1108:
1107:
1105:
1090:
1087:
1085:
1082:
1081:
1078:
1072:
1069:
1067:
1064:
1062:
1059:
1057:
1054:
1052:
1049:
1047:
1044:
1042:
1039:
1037:
1034:
1032:
1029:
1027:
1024:
1022:
1019:
1017:
1014:
1012:
1009:
1007:
1004:
1002:
999:
997:
994:
992:
989:
987:
984:
983:
980:
975:
971:
964:
959:
957:
952:
950:
945:
944:
941:
934:
931:
930:
911:
905:
901:
897:
896:
888:
873:
869:
862:
854:
850:
846:
842:
841:
836:
830:
822:
815:
801:
797:
794:Fisher, Tim.
790:
776:
772:
766:
751:
750:GeeksforGeeks
747:
741:
727:
721:
717:
713:
712:
704:
690:
686:
682:
676:
662:
660:1-5899-5004-6
656:
652:
648:
647:
639:
635:
625:
622:
620:
617:
615:
612:
611:
605:
599:
591:
587:
583:
578:
573:
563:
555:
553:
549:
545:
541:
537:
533:
529:
524:
522:
518:
514:
510:
506:
502:
498:
494:
490:
486:
482:
477:
475:
471:
467:
461:
451:
449:
445:
441:
436:
434:
430:
426:
422:
418:
414:
410:
406:
402:
398:
390:
386:
382:
378:
374:
370:
365:
354:
349:
347:
342:
340:
335:
334:
332:
331:
326:
323:
321:
317:
314:
311:
308:
307:
306:
305:
301:
300:
294:
291:
289:
285:
282:
279:
275:
272:
270:
267:
264:
261:
258:
254:
251:
249:
245:
242:
240:
236:
233:
230:
227:
224:
221:
220:
219:
218:
214:
213:
208:
207:Recompilation
205:
203:
200:
198:
195:
191:
188:
186:
183:
182:
180:
177:
174:
173:Ahead-of-time
171:
170:
169:
168:
164:
163:
158:
155:
153:
150:
148:
145:
143:
140:
138:
135:
134:
133:
132:
129:Types of code
128:
127:
120:
117:
115:
112:
110:
107:
103:
100:
99:
98:
95:
94:
93:
90:
87:
84:
80:
77:
73:
70:
69:
68:
65:
64:
63:
60:
58:
55:
54:
53:
52:
48:
47:
44:
41:
40:
37:
33:
19:
969:
913:. Retrieved
894:
887:
876:. Retrieved
871:
861:
847:(5): 33–34.
844:
838:
829:
814:
803:. Retrieved
800:lifewire.com
799:
789:
778:. Retrieved
774:
765:
754:. Retrieved
752:. 2015-11-03
749:
740:
729:. Retrieved
710:
703:
692:. Retrieved
684:
681:"executable"
675:
664:. Retrieved
645:
638:
569:
556:
544:file handles
525:
488:
478:
463:
440:machine code
437:
421:instructions
416:
412:
408:
404:
400:
394:
179:Just-in-time
152:Machine code
108:
72:Compile time
36:
974:object file
590:entry point
582:boot loader
540:exit status
485:object file
466:source code
460:Object file
433:interpreter
381:hexadecimal
293:Zend Engine
274:Objective-C
142:Object code
137:Source code
114:Interpreter
62:Translation
18:Executables
1104:Categories
970:Executable
935:at What Is
915:2023-03-06
878:2023-03-06
805:2019-09-18
780:2019-09-18
756:2019-09-18
731:2023-03-06
694:2008-07-19
666:2022-03-06
630:References
499:, such as
458:See also:
413:executable
383:notation (
109:Executable
566:Execution
503:(ELF) or
425:data file
377:addresses
373:real mode
318:and
286:and
276:and
246:and
157:Microcode
92:Execution
840:Computer
651:Elsevier
608:See also
604:symbol.
577:firmware
489:assembly
481:compiled
448:bytecode
431:) by an
407:, or an
369:hex dump
231:(Erlang)
147:Bytecode
67:Compiler
976:formats
594:e_entry
521:.rodata
288:Node.js
244:CPython
102:Runtime
1051:OS/360
1031:Mach-O
906:
722:
657:
602:_start
493:linked
429:parsed
417:binary
269:LuaJIT
181:(JIT)
1071:XCOFF
1011:ECOFF
986:a.out
580:, or
517:.data
513:.text
468:in a
403:, an
391:form.
389:ASCII
320:Clang
312:(GCC)
295:(PHP)
278:Swift
265:(JVM)
225:(ART)
175:(AOT)
1089:.exe
1026:Hunk
1021:GOFF
996:COFF
972:and
904:ISBN
720:ISBN
655:ISBN
560:main
548:crt0
325:MSVC
316:LLVM
253:crt0
248:PyPy
239:Mono
229:BEAM
88:(IR)
57:Code
32:.exe
1061:PEF
1046:OMF
1016:ELF
1006:COM
1001:CMD
991:AIF
849:doi
444:CPU
415:or
395:In
1106::
1056:PE
1041:NE
1036:MZ
898:.
870:.
845:38
843:.
798:.
773:.
748:.
714:.
687:.
683:.
649:.
574:,
554:.
534:,
399:,
367:A
284:V8
280:'s
1066:X
962:e
955:t
948:v
918:.
881:.
855:.
851::
823:.
808:.
783:.
759:.
734:.
697:.
669:.
352:e
345:t
338:v
257:C
255:(
34:.
20:)
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.