Files
oldlinux-files/study/sabre/os/articles/ExecutableFileFormats/index.html
2024-02-19 00:25:23 -05:00

84 lines
9.8 KiB
HTML

<html><head><title>OSRC: Executable File Formats </title></head>
<body BGCOLOR=#FFFFFF TEXT=#000000 LINK=#0000FF VLINK=#0000FF ALINK=#107010>
<center><font face=Verdana size=7><b>Executable File Formats</b></font></center><blockquote>.com, .exe, .lib, .obj, a.out, ELF, LE, PE..</blockquote><table width="100%" cellpadding=0 cellspacing=0 border=0>
<tr><td width="33%" align=left></td>
<td width='33%' align=center></td>
<td width='33%' align=right><font size=2>[<a href='..'>Up</a>]</font></td></tr>
</table><hr><p><ul><DL>
<DT><font size=+1>Unix:</font><br>
<ul><DL>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/ELF.pdf'>Executable &amp; Linking Format</a></font><br>
<DD>ELF is the standard executable format on most if not all x86 Unices... read all about it!<p>
<DT><font size=+1>a.out Format</font> - contrib by Anders Gavare<br>
<DD>"The a.out format was created to be simple to map directly into a process virtual address space, to load it on demand (as pages of the code were accessed). If you are extremely sensitive about speed, you might find ELF a bit slower, since reading the ELF header is more complicated than reading the a.out header."<p>
<ul><DL>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/OpenBSD-a.out.txt'>OpenBSD a.out Format</a></font><br>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/a.out.txt'>HP Series 300/400 Implementation</a></font> - by Hewlett-Packard Company<br>
<DD> <p>
</DL></ul>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/DigitalUnixV5-ObjectFileSpec.pdf'>Digital Unix V5 Object File Spec</a></font><br>
<DD>This is the official definition of the object file and symbol table formats used for DIGITAL UNIX object files. It also describes the legal uses of the formats and their interpretation.<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/dwarf-v1.1.0.pdf'>DWARF Debugging Format v1.1.0</a></font><br>
<DD>This document describes v1.1 of the DWARF spec, which is actually must simpler and more widely used than the 2.0 spec...<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/Dwarf.pdf'>DWARF Debugging Format v2.0</a></font><br>
<DD>"This document defines the format for the information generated by compilers, assemblers and linkage editors that is necessary for symbolic, source-level debugging. The debugging information format does not favor the design of any compiler or debugger. Instead, the goal is to create a method of communicating an accurate picture of the source program to any debugger in a form that is economically extensible to different languages while retaining backward compatibility"...<p>
<DT><font size=+1><a href='http://www.delorie.com/djgpp/doc/coff/'>DJGPP COFF Spec</a></font> - by <a href='mailto:dj@delorie.com'>DJ Delorie</a><br>
<DD>"This document should be considered to be the ultimate reference to the DJGPP COFF format. That doesn't mean it's complete, but since this format isn't really documented elsewhere, this is as good as it gets..."<p>
</DL></ul>
<DT><font size=+1>Windows:</font><br>
<ul><DL>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/EXE-3.1.txt'>NE Executable-File Header Format (3.1)</a></font><br>
<DD>"An executable (.EXE) file for the Windows 3.1 operating system contains a combination of code and data or a combination of code, data, and resources. The executable file also contains two headers: an MS-DOS header and a Windows header." This file describe these headers as well as the code and data contained in a Windows executable file."<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/PE.pdf'>PE - Portable Executable Format</a></font><br>
<DD>The current binary executable file format used by Microsoft Windows. This is the primary format used in Windows NT and Windows 9x...<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/LX.txt'>LX - Linear eXecutable Module Format Description</a></font> - by <a href='mailto:doutre@acm.org'>Edd Doutre</a><br>
<DD>"The LX format was developed by myself [that is, Edd] (at IBM) as the new and improved flavor that was hoped to be common between OS/2 and Windows NT. However, the guys at Redmond were still changing the format around in quite significant ways and IBM shipped OS/2 using the LX format.<p>The whole idea was to create something that was oriented towards performance on an Intel platform, using 4096 byte paging. There are page tables in the LX format and the process of 'loading' (whatever that means to the various people who may be reading this) would consist only of reading in the header and page tables. Actual execution would result in page-not-present faults which could easily use the page tables to load that actual page of code or data from the binary file. In addition, the file size seems to be about one half of the size of the same object modules re-linked into the Microsoft PE format." - Thanks to <a href="mailto:doutre@acm.org">Edd Doutre</a> for the corrected summary!<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/omf.script'>IBM OS/2 32 bit Object Module Format (OMF) and Linear eXecutable Module Format (LX)</a></font> - by IBM Corp<br>
<DD>This file describes the IBM OMF file format and LX records. It's in a wierd .script format, but it is easy to ignore the extra markup...<p>
</DL></ul>
<DT><font size=+1>DOS:</font><br>
<ul><DL>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/COM.txt'>.COM File Format</a></font> - by <a href='mailto:corion@informatik.uni-frankfurt.de'>Max Maischein</a><br>
<DD>A very short document on the very simple .COM file format.<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/EXE.txt'>.EXE File Format</a></font><br>
<DD>File header and relocation information.<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/SYS.txt'>.SYS File Format</a></font> - by Brian Fraser<br>
<DD>File format used by DOS system drivers... typically in the config.sys file.<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/AppendingFilesToEXEs.txt'>Appending files to EXE files</a></font> - by <a href='mailto:CAD@UnOmaha.edu'>Charles Jones</a><br>
<DD>"After seeing several questions on appending files to EXEs, I decided to write this text. I did NOT originate this idea. While this text describes "a" way of implementing the technique it may not be the best way for your needs. I have simply attempted to supply you with a basic understanding of the process." - This file <a href="/sabre/os/files/Executables/AppendingFilesToEXEs.zip">came in a package</a> that included a bunch of source and examples.<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/EXE-LINK.txt'>Advanced Linking Techniques</a></font> - by Ervin<br>
<DD>"In the good old days most of the programs had many files. That was a simple and convenient way for storing the necessary data. But the time quickly ran forth and a new tendency appeared: the single EXE method. This is more difficult to deal with (from the coders' point of view), but it's also more elegant. So this article discusses some system coding, which is important in a demo, but quite invisible."<p>
</DL></ul>
<DT><font size=+1>DOS Intermediate Compiler File Formats:</font><br>
<ul><DL>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/OMF1.1.pdf'>.OBJ File Format v1.1</a></font><br>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/OBJ_FORM.ZIP'>.OBJ File Format</a></font><br>
<DD>"This document is intended to serve a purpose that up until now has been performed by the LINK source code: to be the official definition for the object module format (the information inside .OBJ files) supported by Microsoft's language products. The goal is to include all currently used or obsolete OMF record types, all currently used or obsolete field values, and all extensions made by Microsoft, IBM, and others."<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/LIB.txt'>.LIB File Format</a></font><br>
<DD>"This article describes the components of the Microsoft .LIB Format. The .LIB Format is consistent between compatible Microsoft languages." Also interesting is this article on the <A href="http://www.nondot.org/sabre/os/files/Executables/LIBDICT.TXT">dictionary hashing function</a> used for .LIB files.<p>
<DT><font size=+1><a href='http://www.nondot.org/sabre/os/files/Executables/MicrosoftSymbolAndTypeInfo.pdf'>Microsoft Symbol and Type Information</a></font><br>
<DD>"This document describes the format and meaning of Microsoft symbol and type debugging information. The information is contained within two tables emitted by the language processor into the object file. Each table is treated as a stream of variable length records."... basically the format Microsoft uses to store source level debugging info in .OBJ files.<p>
</DL></ul>
</DL></ul>
<hr>
<TABLE ALIGN=RIGHT BORDER=0><TR><TD><center>
Copyright &copy; 1995-2002 <i><a href='mailto:sabre@nondot.org'>Chris Lattner</a></i><br>
This page last modified:11/05/03<br><a href='..'>Go up a level</a><br>
</center></TD></TR></TABLE>
<font size=-1>
[about] [faq]
[<a href='/sabre/os/articles/../Updates/'>updates</a>]
[<a href='/sabre/os/articles/../Stats/'>stats</a>]
[<a href='/sabre/os/articles/../AuthorRecognition.html'>author recognition</a>]
[<a href='/sabre/os/articles/../submit/'>contributing</a>]
[<a href='/sabre/os/articles/PendingQueue/'>pending submissions</a>]
[feedback]
[<a href='mailto:sabre@nondot.org'>email</a>]
[<a href='../'>up</a>]
</font><p>
<font size=-1>
<font color=#FF0000>(new!)</font> sections have been updated in the last week...
<font color=#808000>(recent)</font> sections have been updated in the last two weeks...<br>
</font>