Share to: share facebook share twitter share wa share telegram print page

Executable

A hex dump of an executable real mode loader. The first column consists of addresses of the first byte in the second column, which comprises bytes of data in hexadecimal notation (least significant byte first), and the last column consists of the corresponding ASCII form.[1]

In computer science, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instructions",[2] as opposed to a data file that must be interpreted (parsed) by an interpreter to be functional.[3]

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 source code in a high-level language that can be easily understood by humans. In some cases, source code might be specified in assembly language instead, which remains human-readable while being closely associated with machine code instructions.

The high-level language is compiled into either an executable machine code file or a non-executable machine code – object file of some sort; the equivalent process on assembly language source code is called assembly. Several object files are linked to create the executable. Object files -- executable or not -- are typically stored in a container format, such as Executable and Linkable Format (ELF) or Portable Executable (PE) which is operating system-specific.[5] This gives structure to the generated machine code, for example dividing it into sections such as .text (executable code), .data (initialized global and static variables), and .rodata (read-only data, such as constants and strings).

Executable files typically also include a runtime system, which implements runtime language features (such as task scheduling, exception handling, calling static constructors and destructors, etc.) and interactions with the operating system, notably passing arguments, environment, and returning an exit status, together with other startup and shutdown features such as releasing resources like file handles. For C, this is done by linking in the crt0 object, which contains the actual entry point and does setup and shutdown by calling the runtime library.[6]

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 operating system, firmware[citation needed], or boot loader), an executable file must conform to the system's application binary interface (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.[8] In more complicated interfaces, executable files have additional metadata specifying a separate entry point. For example, in ELF, the entry point is defined in the header's 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

References

  1. ^ Celovi, Paul (2002). Embedded FreeBSD Cookbook. Elsevier. pp. 108, 187–188. ISBN 1-5899-5004-6. Retrieved 2022-03-06.
  2. ^ "executable". Merriam-Webster's Online Dictionary. Merriam-Webster. Retrieved 2008-07-19.
  3. ^ Mueller, John Paul (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons. p. 24. ISBN 978-0-470-04616-6. Retrieved 2023-03-06.
  4. ^ "Machine Instructions". GeeksforGeeks. 2015-11-03. Retrieved 2019-09-18.
  5. ^ "Chapter 4: Object Files". refspecs.linuxbase.org. Retrieved 2019-09-18.
  6. ^ Fisher, Tim. "List of Executable File Extensions". lifewire.com. Retrieved 2019-09-18.
  7. ^ McKellar, Jessica (2010-03-16). "Hello from a libc-free world! (Part 1)".
  8. ^ Smith, James E.; Nair, Ravi (2005-05-16). "The Architecture of Virtual Machines". Computer. 38 (5): 33–34. doi:10.1109/MC.2005.173.
  9. ^ Rusling, David A. (1999). "Chapter 4 – Processes". The Linux Kernel. sec. 4.8.1 – ELF. Retrieved 2023-03-06.
  10. ^ Page, Daniel (2009). A Practical Introduction to Computer Architecture. Springer Science+Business Media. pp. 415–416. ISBN 978-1-84882-255-9. Retrieved 2023-03-06.

Read other articles:

جبل التاج الإحداثيات 31°56′58″N 35°57′01″E / 31.949401°N 35.950248°E / 31.949401; 35.950248  تقسيم إداري  البلد الأردن  التقسيم الأعلى محافظة العاصمة  تعديل مصدري - تعديل   يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر م...

هذه المقالة بحاجة لمراجعة خبير مختص في مجالها. يرجى من المختصين في مجالها مراجعتها وتطويرها. (أبريل 2019) اضغط هنا للاطلاع على كيفية قراءة التصنيف زواحفالعصر: 310–0 مليون سنة قك ك أ س د ف بر ث ج ط ب ن المرتبة التصنيفية طائفة  التصنيف العلمي  فوق النطاق  حيويات مملكة علي...

Логотип МПР Міжнаро́дний поля́рний рік (МПР)  — комплексні дослідження полярних областей Землі та окремих гірських льодовикових районів. 1-й МПР: серпень 1882 — серпень 1883; Радянські поштові марки 1932 р. присвячені 2-ому МПРу 2-й МПР: серпень 1932 — серпень 1933; 3-й МПР: ...

KlisoeraКлисура Dorp in Bulgarije Situering Oblast Sofia Gemeente Samokov Coördinaten 42° 20′ NB, 23° 22′ OL Algemeen Oppervlakte 30,91 km² Inwoners (31 december 2019) 199 Hoogte 1100 m Overig Postcode 2026 Netnummer 07124 Kenteken СО Portaal    Bulgarije Klisoera (Bulgaars: Клисура) is een dorp in het westen van Bulgarije. Zij is gelegen in de gemeente Samokov in de oblast Sofia. Het dorp ligt 15 km van Samokov, 25 km van Doepnitsa en 40 km ten zuide...

Achille Loria Información personalNacimiento 2 de marzo de 1857 Mantua (Imperio austríaco) Fallecimiento 6 de noviembre de 1943 (86 años)Luserna San Giovanni (Italia) EducaciónEducado en Universidad de LondresUniversidad de BoloniaUniversidad de Pavía Información profesionalOcupación Economista, político y profesor Cargos ocupados Senador del Reino de Italia Empleador Universidad de PaduaUniversidad de TurínUniversidad de Siena Partido político Partido Socialista Italiano [edit...

Saraf maksilaRincianPengidentifikasiBahasa LatinNervus maxillarisMeSHD008442TA98A14.2.01.037TA26216FMA52724Daftar istilah neuroanatomi[sunting di Wikidata] Saraf maksila (CN V2) adalah salah satu dari tiga cabang saraf trigeminus. Fungsinya adalah mensarafi gigi atas, bibir atas, palatum, batang hidung, rongga hidung, dan sinus maksilaris. Saraf ini bermula di pertengahan ganglion trigeminal dan keluar dari tengkorak lewat foramen rotundum. Referensi Monkhouse, Stanley (2006). Cranial ner...

Cet article est une ébauche concernant la route et le Cameroun. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Pour les articles homonymes, voir Route nationale 5. Route nationale 5 Kutenda Center, une aire de repos le long de la RN5, à Bakakte Localisation de la route nationale 5 Caractéristiques Longueur 219 km De Békoko À Bandjoun Territoires traversés Villes principales Békoko, Loum, Nkongsamba, ...

A fantasy creature inspired by the architectural Gargoyle element A gargoyle monster as depicted in the tabletop RPG Dungeons & Dragons The gargoyle is a fantasy and horror monster inspired by the gargoyle architectural element. While they were believed in mythology to frighten away evil spirits, the idea of such statues physically coming to life is a more recent notion. Like golems, they are usually made of magically animated or transformed stone, but have animal or chimera traits and ar...

Женское кантри-трио Dixie Chicks на концерте в Остине, Техас. Top Country Albums 2003 — это список кантри-альбомов № 1 в США в 2003 году, созданный на основе еженедельных хит-парадов журнала Billboard[1][2]. Содержание 1 История 2 См. также 3 Примечания 4 Ссылки История 14 недель на № 1 ...

筑豊電気鉄道3000形電車 基本情報製造所 アルナ工機主要諸元編成 2車体3台車固定編成軌間 1,435 mm電気方式 直流600V(架空電車線方式)最高運転速度 60 km/h編成定員 96人(着席48人)全長 18,600 mm全幅 2,430 mm全高 3,940 mm車体 普通鋼(全金属製)台車 川崎重工製 KW-177、KW-178主電動機 直流直巻電動機主電動機出力 45kW搭載数 2基 / 両駆動方式 吊り掛け駆動方式編成出力 180kW制...

Filipino politician In this Spanish name, the first or paternal surname is de las Alas and the second or maternal family name is Noble. Antonio de las AlasSenator of the PhilippinesIn officeJuly 9, 1945 – May 25, 1946Secretary of FinanceIn officeFebruary 19, 1936 – November 15, 1938PresidentManuel L. QuezonPreceded byElpidio QuirinoSucceeded byManuel RoxasSecretary of Public Works and CommunicationsIn officeJanuary 26, 1933 – February 18, 1936Appointed...

Art museum in Shabbetai Levi Street, HaifaHaifa Museum of ArtHaifa Museum of ArtEstablished1951Location26 Shabbetai Levi Street, Haifa, 3304331TypeArt museumDirectoryotam yakirCuratorkobi ben meirWebsitewww.hma.org.il/eng The Haifa Museum of Art (Hebrew: מוזיאון חיפה לאמנות, Arabic: متحف حيفا للفنون), established in 1951, is located in a historic building built in the 1930s in Wadi Nisnas, downtown Haifa. Ranking as Israel's third largest art museum, the museum ...

Steamboat Sue H. Elmore sometime between 1900 and 1917. History NameSue H. Elmore, later Bergen, and Cuyamaca OwnerPacific Navigation Co., others later Port of registryAstoria, Oregon, other places later BuilderJoseph Supple, Portland, Oregon LaunchedJune 30, 1900 Maiden voyageSep. 21, 1900 Out of serviceearly 1950s Identification116997 Noteswooden construction General characteristics TypeCoastal passenger, freighter, tow and tug Tonnage232 gross tons; 131 net tons Length90.7 ft (27.65&#...

For the New Zealand rower, see Nikki Payne (rower). Canadian comedian and actress Nikki PayneBorn (1976-01-17) January 17, 1976 (age 47)[1]Lower Sackville, Nova Scotia, Canada[1]Occupation(s)Actress, Comedian Nikki Payne (also credited as Nikkie Payne), is a Canadian comedian and actress, from Lower Sackville, Nova Scotia, Canada.[1] Born with a cleft palate,[1] she is well known for incorporating her lisp into her comedy act.[1] She has won three ...

Nabinagar Assembly constituencyConstituency No. 221 for the Bihar Legislative AssemblyConstituency detailsCountryIndiaRegionEast IndiaStateBiharDistrictAurangabad district, BiharLS constituencyKarakat (Lok Sabha constituency) Elected year2020 Assembly constituency in Bihar, India This article is about the constituency of Bihar Legislative Assembly. For Nabinagar city, see Nabinagar. Nabinagar Assembly constituency is an assembly constituency for Bihar Legislative Assembly in Aurangabad distri...

Иоганн Ран Дата рождения 10 марта 1622(1622-03-10)[1][2] Место рождения Тёсс[d], Винтертур, Цюрих, Швейцария[1] Дата смерти 27 мая 1676(1676-05-27)[1] (54 года) или 25 мая 1676(1676-05-25)[2] (54 года) Место смерти Цюрих, Швейцария[1] Страна Швейцария  Медиафайлы на Викискладе И...

Spanish sociologist and political scientist (1926–2013) In this Spanish name, the first or paternal surname is Linz and the second or maternal family name is Storch de Gracia. Juan José Linz Storch de Gracia (24 December 1926 – 1 October 2013) was a German-born Spanish sociologist and political scientist specializing in comparative politics. He was Sterling Professor Emeritus of Sociology and Political Science at Yale University and an honorary member of the Scientific Council at...

Frontstretch (in summer) The World Championship Snowmobile Derby is the World championship snowmobile race. It is held at the World Championship Derby Complex,[1] formerly known as the Eagle River Derby Track, along U.S. Route 45 in Eagle River, Wisconsin on the third weekend in January. Eagle River is known as the Snowmobile Capital of the World because it hosts the Derby.[2] Eagle River is located in the same county as Sayner, Wisconsin, the place that Carl Eliason invented ...

Arena KamiNama lengkapShimane Prefectural Hamayama GymnasiumLokasiIzumo, Shimane, JepangPemilikPrefektur ShimaneOperatorPemerintah Prefektur ShimaneKapasitas2,840KonstruksiBiaya Situs webhttp://www.hamayamakoen.jp/taikukan.htmlArena Kami adalah arena di Izumo, Shimane, Jepang.[1] Referensi ^ Hamayama Park (Maret 2018). 体育館. Diarsipkan dari versi asli tanggal 2022-01-29. Diakses tanggal 27 Maret 2018.  Koordinat: 35°23′2.3″N 132°42′23.6″E / 35.383...

Brazil-related events during the year of 1874 1874 in Brazil Years 1872 1873 1874 1875 1876 Flag 20 stars (1871–89) Timeline of Brazilian history Empire of Brazil Year of Constitution: 1824 Events in the year 1874 in Brazil. Incumbents Monarch: Pedro II Prime Minister: Viscount of Rio Branco Events May 24 - Revolt of the Muckers: religious service was held in Ferrabraz, where Jacobina announced the end of the world and ordered the extermination of 16 enemy families June 15 - Revolt of the M...

Kembali kehalaman sebelumnya