⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c-loader2.html

📁 vxworks相关论文
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>    Object-Module Loader   </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-loader.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-loader.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-loader1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-loader3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="84397">3.2  &nbsp;&nbsp;Terminology</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84398"> </a>Although the following terms are in common usage, we review the distinctions among them:</p></dl><dl class="margin"><dd><div class="Item"><a name="84400"> </a><i class="term">object file</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84401"> </a>The unrelocated output of a compiler or assembler (conventionally produced with a compiler's <b class="command">-c</b> option, and named with a <b class="file">.o</b> suffix).</div><br></dl></dl><dd><div class="Item"><a name="84403"> </a><i class="term">object module</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84404"> </a>The contents of an object file. </div><br></dl></dl><dd><div class="Item"><a name="84406"> </a><i class="term">object module format (OMF)</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84407"> </a>The convention in which the data in an object module is organized. Several different OMF standards exist, such as <i class="term">a.out</i>, COFF, and ELF. On the whole, OMFs are independent from the underlying architecture. However, the relocation information contained in object modules is architecture dependent.</div><br></dl></dl><dd><div class="Item"><a name="84412"> </a><i class="term">relocatable file</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84413"> </a>An object file for which text and data sections are in a transitory form, where some addresses are not yet known. These sections must be modified (<i class="term">relocated</i> or <i class="term">linked</i>) when they are loaded in order to be executable. In a cross-development environment, information not known about an object module at compilation time includes the program execution address (also called the entry point) and the addresses of externally defined symbols (such as library routines). By default, the loader assumes that some module addresses are unknown and that relocation is required.</div><br></dl></dl><dd><div class="Item"><a name="84416"> </a><i class="emphasis"></i><i class="term">executable file</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84417"> </a>A file that is fully linked and ready to run at a specified address. For such files, no relocation stage is required. The loader is able to load files that do not require a relocation stage, but it must be told that the file type is fully linked. </div><br></dl></dl><dd><div class="Item"><a name="84419"> </a><i class="term">object module header</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84420"> </a>The portion of an object module that holds various information, such as the type of object module (often called the magic number) and the sizes of the different sections.</div><br></dl></dl><dd><div class="Item"><a name="84423"> </a><i class="term">raw data</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84424"> </a>The main part of an object module, corresponding to the program code and data. The loader can handle four kinds of sections:</div><br></dl></dl><dl class="margin"><ul class="DashSingle2" type="circle"><li><a name="84425"> </a><i class="emphasis">Text sections</i> hold the program code.</li></ul><ul class="DashSingle2" type="circle"><li><a name="84426"> </a><i class="emphasis">Data sections </i>hold the initialized program variables.</li></ul><ul class="DashSingle2" type="circle"><li><a name="84427"> </a><i class="emphasis">Bss sections</i> hold the uninitialized program variables.</li></ul><ul class="DashSingle2" type="circle"><li><a name="84428"> </a><i class="emphasis">Literal sections</i> hold the program constants and strings.</li></ul><dl class="margin"><dd><div class="Indent2"><a name="84429"> </a>Depending on the OMF, an object module may contain several sections of each type. (This is true of both COFF and ELF.) It is also possible that the text and data sections may be the only two sections in the module. (The <i class="acronym_lc">a.out</i> format follows this model; however, <i class="acronym_lc">a.out</i> sections are typically referred to as segments.)</div><br></dl></dl><dd><div class="Item"><a name="84431"> </a><i class="term">symbol entries</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84432"> </a>Information about every symbol defined (<i class="emphasis">local symbols</i>) or referred to (<i class="emphasis">external symbols</i>) in the object module. The term <i class="emphasis">symbol</i> refers to every variable, routine, or constant that is accessible from other parts of the program (<i class="emphasis">public</i>).</div><br></dl></dl><dd><div class="Item"><a name="84434"> </a><i class="term">relocation entries</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84435"> </a>Information required to adapt the program to its execution environment. The relocation entries point to each place where a relocation is required, and indicate the type of operation required to perform it. </div><br></dl></dl><dd><div class="Item"><a name="84437"> </a><i class="term">string table</i> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="84438"> </a>A table containing all symbol strings. For <i class="acronym_lc">a.out</i> and ELF it holds all strings; for COFF it holds only strings larger than a certain size.</div><br></dl></dl></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-loader.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-loader.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-loader1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-loader3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc.    conversion tool:  Quadralay WebWorks Publisher 4.0.11    template:         CSS Template, Jan 1998 - Jefro --->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -