Object file

An object file is a file that contains machine code or bytecode, as well as other data and metadata, generated by a compiler or assembler from source code during the compilation or assembly process. The machine code that is generated is known as object code.

The object code is usually relocatable, and not usually directly executable. There are various formats for object files, and the same machine code can be packaged in different object file formats. An object file may also work like a shared library.

The metadata that object files may include can be used for linking or debugging; it includes information to resolve symbolic cross-references between different modules, relocation information, stack unwinding information, comments, program symbols, and debugging or profiling information. Other metadata may include the date and time of compilation, the compiler name and version, and other identifying information.

The term "object program" dates from at least the 1950s:

A term in automatic programming for the machine language program produced by the machine by translating a source program written by the programmer in a language similar to algebraic notation.[1]

A linker is used to combine the object code into one executable program or library pulling in precompiled system libraries as needed.

Object file formats

There are many different object file formats; originally each type of computer had its own unique format, but with the advent of Unix and other portable operating systems, some formats, such as ELF and COFF, have been defined and used on different kinds of systems.

Some systems make a distinction between formats which are directly executable and formats which require processing by the linker. For example, OS/360 and successors call the first format a load module and the second an object module. In this case the files have entirely different formats.[2] DOS and Windows also have different file formats for executable files and object files, such as Portable Executable for executables and COFF for object files in 32-bit and 64-bit Windows.

Unix and Unix-like systems have used the same format for executable and object files, starting with the original a.out format. Some formats can contain machine code for different processors, with the correct one chosen by the operating system when the program is loaded.[3][4]

The design and/or choice of an object file format is a key part of overall system design. It affects the performance of the linker and thus programmer turnaround while a program is being developed. If the format is used for executables, the design also affects the time programs take to begin running, and thus the responsiveness for users.

The GNU Project's Binary File Descriptor library (BFD library) provides a common API for the manipulation of object files in a variety of formats.

Absolute files

Many early computers, or small microcomputers, support only an absolute object format. Programs are not relocatable; they need to be assembled or compiled to execute at specific, predefined addresses. The file contains no relocation or linkage information. These files can be loaded into read/write memory, or stored in read-only memory. For example, the Motorola 6800 MIKBUG monitor contains a routine to read an absolute object file (SREC Format) from paper tape.[5] DOS COM files are a more recent example of absolute object files.[6]

Segmentation

Most object file formats are structured as separate sections of data, each section containing a certain type of data. These sections are known as "segments" due to the term "memory segment", which was previously a common form of memory management. When a program is loaded into memory by a loader, the loader allocates various regions of memory to the program. Some of these regions correspond to sections of the object file, and thus are usually known by the same names. Others, such as the stack, only exist at run time. In some cases, relocation is done by the loader (or linker) to specify the actual memory addresses. However, for many programs or architectures, relocation is not necessary, due to being handled by the memory management unit or by position-independent code. On some systems the segments of the object file can then be copied (paged) into memory and executed, without needing further processing. On these systems, this may be done lazily, that is, only when the segments are referenced during execution, for example via a memory-mapped file backed by the object file.

Types of data supported by typical object file formats:[7]

Segments in different object files may be combined by the linker according to rules specified when the segments are defined. Conventions exist for segments shared between object files; for instance, in DOS there are different memory models that specify the names of special segments and whether or not they may be combined.[8]

The debugging data format of debugging information may either be an integral part of the object file format, as in COFF, or a semi-independent format which may be used with several object formats, such as stabs or DWARF.

See also

References

  1. ^ Wrubel, Marshal H. (1959). A primer of programming for digital computers. New York, USA: McGraw-Hill. p. 222. Retrieved 2020-07-31.
  2. ^ IBM OS Linkage Editor and Loader (PDF). IBM Corporation. 1973. p. 16. Retrieved 2012-08-06.
  3. ^ "Universal Binaries and 32-bit/64-bit PowerPC Binaries". OS X ABI Mach-O File Format Reference. Apple Inc. 2009-02-04 [2003]. Archived from the original on 2014-09-04.
  4. ^ "FatELF: Universal Binaries for Linux". Retrieved 2020-08-02.
  5. ^ Wiles, Mike; Felix, Andre. MCM6830L7 MIKBUG/MINIBUG ROM (PDF). Motorola Semiconductor Products, Inc. Retrieved 2020-07-31.
  6. ^ Godse, Deepali A.; Godse, Atul P. (2008). Microprocessor (1 ed.). Pune, India: Technical Publications. pp. 3–15. ISBN 978-81-8431-355-0.
  7. ^ Mauerer, Wolfgang (2010). "Appendix E. The ELF Binary Format". Professional Linux Kernel Architecture. John Wiley & Sons. p. Appendix E. ISBN 978-0-470-34343-2. Retrieved 2020-08-01.
  8. ^ Irvine, Kip R. (1993). Assembly language for the IBM-PC (2 ed.). New York, USA: Macmillan. ISBN 0-02-359651-1.

Further reading

Read other articles:

Yang Berhormat Dato' Paduka HajiHusam bin Musa Anggota Parlemen Malaysiadapil Kubang Kerian, KelantanMasa jabatan29 November 1999 – 21 Maret 2004 PendahuluMohamad SabuPenggantiSalahuddin AyubKelantan Exco (Perencanaan Ekonomi, Keuangan Dan Kesejahteraan)Masa jabatan2004 – 6 Mei 2013Daerah pemilihanSalorAnggota Majelis Negara Bagian Kelantandapil SalorPetahanaMulai menjabat 8 Maret 2008 PendahuluBuni Amin HamzahPenggantiPetahana Informasi pribadiLahir14 Oktober 1959 (...

 

 

Способы образования согласных Шумные Смычные Взрывные Аффрикаты Щелевые Сибилянты Сонорные Носовые Одноударные Дрожащие Аппроксиманты Плавные Гласные Скользящие (полугласные) Боковые Воздушные потоки Абруптивные Ингрессивные Имплозивные Щёлкающие ФонацияВремя на�...

 

 

Orang SamoaJumlah populasic. 650,000-700,000Daerah dengan populasi signifikan Samoa194,320 Amerika Serikat184,440[1] Selandia Baru144,138[2] Australia75,755[3] Samoa Amerika55,519 Kanada1,100[4]BahasaSamoa, InggrisAgamaKekristenan, Politeisme Orang Samoa (bahasa Samoa: tagata Sāmoa) adalah penduduk asli Polinesia di Kepulauan Samoa, sebuah kepulauan di Polinesia. Mereka menuturkan bahasa Samoa. Secara politis dan geografis, ke...

Tyrone Power Tyrone Power (5 Mei 1914-15 November 1958) adalah aktor Amerika yang sangat terkenal pada zamannya.[1] Ia berasal dari keluarga yang berkecimpung di dunia teater dan selama beberapa waktu terjun ke bidang tersebut.[1] Lalu, ia pindah ke bidang radio bersama dengan Don Amache dan kembali lagi ke panggung sandiwara.[1] Film-filmnya yang terkenal antara lain Tom Brown of Culver (1932), Ladies in Love (1936), In Old Chicagao (1938), The Raine Came (1939), Mark...

 

 

Polish mixed martial artist (born 1983) Jan BłachowiczBłachowicz at UFC Fight Night 136 post fight interview in Moscow, 2018BornJan Maciej Błachowicz[1] (1983-02-24) February 24, 1983 (age 41)Cieszyn, PolandResidenceWarsaw, PolandHeight6 ft 2 in (1.88 m)Weight205 lb (93 kg; 14 st 9 lb)DivisionLight heavyweightReach78 in (198 cm)[2]Fighting out ofWarsaw, PolandTeamBerkut WCA Fight Team (until 2014, 2017–present)[4][5]...

 

 

Busted!Poster musim 1Hangul범인은 바로 너 GenreMisteri Acara varietasPemeranYoo Jae-sukAhn Jae-wookKim Jong-minLee Kwang-sooPark Min-youngOh SehunKim Se-jeongLee Seung-giNegara asalKorea selatanJmlh. musim3Jmlh. episode28ProduksiProduserCho Hyo-jinKim Ju-hyungDurasi62-97 MenitRumah produksiSangSang CompanyNetflixDistributorNetflixRilis asliFormat gambar1080pFormat audioDolby DigitalRilis4 Mei 2018 –22 Januari 2021 Busted! (범인은 바로 너) adalah acara ragam Korea Selatan y...

保良局馬錦明夫人章馥仙中學Po Leung Kuk Mrs.Ma-Cheung Fook Sien College翻漆後的校舍東北面(2022年3月)地址 香港新界離島區大嶼山東涌富東邨类型津貼中學宗教背景無隶属保良局创办日期1997年学区香港離島區東涌校長柯玉琼女士副校长鄭健華先生,劉俊偉先生助理校长梁煥儀女士职员人数56人年级中一至中六学生人数約700人,24個班別校訓愛、敬、勤、誠校歌保良局屬下校歌�...

 

 

4th Regiment may refer to: Australia 4th Regiment, Royal Australian Artillery 4th Light Horse Regiment (Australia) 4th Combat Engineer Regiment (Australia) France 4th Infantry Regiment (France) Greece 4th Infantry Regiment (Greece) 4th Archipelago Regiment 4/41 Evzone Regiment Italy 4th Mountain Artillery Regiment (Italy) Lithuania 4th Infantry Regiment (Lithuania) 4th Lithuanian Vanguard Regiment Philippine Commonwealth 4th Infantry Regiment (Philippine Commonwealth Army) 4th Infantry Regime...

 

 

This partial list of city nicknames in Michigan compiles the aliases, sobriquets and slogans that cities in Michigan are known by (or have been known by historically), officially and unofficially, to municipal governments, local people, outsiders or their tourism boards or chambers of commerce. City nicknames can help in establishing a civic identity, helping outsiders recognize a community or attracting people to a community because of its nickname; promote civic pride; and build community ...

Військово-музичне управління Збройних сил України Тип військове формуванняЗасновано 1992Країна  Україна Емблема управління Військово-музичне управління Збройних сил України — структурний підрозділ Генерального штабу Збройних сил України призначений для планува...

 

 

Halaman ini berisi artikel tentang kota. Untuk kegunaan lain, lihat Darussalam (disambiguasi). Dar es Salaam DarKotaDari atas; kiri ke kanan: Pemandangan udara Dar es Salaam, Kota dari MV Kigamboni, Stadion Nasional Tanzania, Pemandangan udara di Pelabuhan Dar es SalaamDar es SalaamLokasi Dar es SalaamKoordinat: 06°48′58″S 39°16′49″E / 6.81611°S 39.28028°E / -6.81611; 39.28028Koordinat: 06°48′58″S 39°16′49″E / 6.81611°S 39.28028°...

 

 

Public park in Washington County, Oregon, United States Chehalem Ridge Nature ParkWelcome plaza in 2022TypePublicLocationNear Gaston, OregonUnited StatesCoordinates45°26′N 123°05′W / 45.44°N 123.08°W / 45.44; -123.08Area1,260 acres (510 hectares)Created2021Operated byMetroStatusOpenWebsiteChehalem Ridge Nature Park Chehalem Ridge Nature Park is a 1,260 acres (510 ha) nature park in the Portland metropolitan area in the U.S. state of Oregon. Opened in ...

1942 Japanese naval attack off the coast of Santa Barbara, California, USA This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (February 2011) (Learn how and when to remove this message) Bombardment of EllwoodPart of World War IIPacific War and American WarThe Ellwood Oil Field and the location of the Japanese attack.DateFebruary 23, 1942LocationEllwood, Californi...

 

 

  هذه المقالة عن تل محمد (موقع أثري في العراق). لقرية تل محمد، طالع تل محمد (قرية). تل محمدمعلومات عامةنوع المبنى شقق مال ك_حابالمنطقة الإدارية بغداد البلد  العراق تعديل - تعديل مصدري - تعديل ويكي بيانات جزء من سلسلة مقالات حولتاريخ العراق ما قبل التاريخ فترة العبيد ثقا...

 

 

Two-year college in Richland Center, Wisconsin, US University of Wisconsin–Platteville RichlandTypePublicActive1967–May 2023Parent institutionUniversity of Wisconsin SystemLocationRichland Center, Wisconsin, U.S.43°20′43″N 90°23′52″W / 43.3452°N 90.3978°W / 43.3452; -90.3978ColorsRoyal blue and white, with red accentsMascotRoadrunnerWebsiteuwplatt.edu/richland UW–Richland Melvill Hall UW–Richland campus UW–Richland The University of Wisconsin–Pl...

Untuk kegunaan lain, lihat Honda Beat (disambiguasi). Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber: Honda Beat – berita · surat kabar · buku · cendekiawan · JSTOR Artikel ini berisi konten yang ditulis dengan gaya sebuah iklan. Bantulah memperbaiki ...

 

 

PranPran pada tahun 2010LahirPran Krishan Sikand(1920-02-12)12 Februari 1920New DelhiMeninggal12 Juli 2013(2013-07-12) (umur 93)Mumbai, Maharashtra, IndiaTempat tinggalMumbai, Maharashtra, IndiaPekerjaanAktorTahun aktif1940–2007Suami/istriShukla Sikand (1945–2013, hingga kematiannya)AnakArvind, Sunil, PinkySitus webwww.pransikand.com Penghargaan Filmfare Penghargaan Dadasaheb Phalke Padma Bhushan Pran Krishan Sikand (12 Februari 1920 – 12 Juli 2013), lebih diken...

 

 

Editor, daughter of Charles Darwin Henrietta LitchfieldLitchfield with her brother William Erasmus Darwin around 1905BornHenrietta Emma Darwin(1843-09-25)25 September 1843Down House, Downe, Kent, EnglandDied17 December 1927(1927-12-17) (aged 84)Burrows Hill, Gomshall, Surrey, EnglandBurial placeSt Mary the Virgin Churchyard, DowneSpouseRichard Buckley LitchfieldParent(s)Charles DarwinEmma WedgwoodRelativesSee Darwin–Wedgwood family Henrietta Emma Litchfield (née Darwin; 25 September 1...

دينيس هو واحد من 4000 شاب تم تدريبهم من قبل مركز تنمية الشباب في شمال أوغندا الذي تدعمه المملكة المتحدة في العام الماضي الإنجليزية الأوغندية [1] [2] (بالإنجليزية Ugandan English أو اختصاراً Uglish)[3] هي تنوع في اللغة الإنجليزية المنطوقة في دولة أوغندا. تأثير اللغات الأصلية تؤ...

 

 

Dialect This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Murcian Spanish – news · newspapers · books · scholar · JSTOR (January 2016) (Learn how and when to remove this message) Murcian SpanishmurcianoPronunciation[muɾˈθjano]Native toSpainRegionMurcia, Andalusia (Almería, partially in Jaén a...