Newer
Older
UbixOS / doc / html / elf_8h-source.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>UbixOS V2: src/sys/include/ubixos/elf.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_897b6a2d7bab147dd1db58381aad3984.html">src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_832905b1f7f5feaf61a306b40c0ac817.html">sys</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_caf4200c438ae9601464168e21e8e4d8.html">include</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_9854bc9d2b9a2a73f32c73e97d31d0f7.html">ubixos</a></div>
<h1>elf.h</h1><a href="elf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*****************************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> Copyright (c) 2002-2004 The UbixOS Project</span>
<a name="l00003"></a>00003 <span class="comment"> All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment"> Redistribution and use in source and binary forms, with or without modification, are</span>
<a name="l00006"></a>00006 <span class="comment"> permitted provided that the following conditions are met:</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment"> Redistributions of source code must retain the above copyright notice, this list of</span>
<a name="l00009"></a>00009 <span class="comment"> conditions, the following disclaimer and the list of authors.  Redistributions in binary</span>
<a name="l00010"></a>00010 <span class="comment"> form must reproduce the above copyright notice, this list of conditions, the following</span>
<a name="l00011"></a>00011 <span class="comment"> disclaimer and the list of authors in the documentation and/or other materials provided</span>
<a name="l00012"></a>00012 <span class="comment"> with the distribution. Neither the name of the UbixOS Project nor the names of its</span>
<a name="l00013"></a>00013 <span class="comment"> contributors may be used to endorse or promote products derived from this software</span>
<a name="l00014"></a>00014 <span class="comment"> without specific prior written permission.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment"> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY</span>
<a name="l00017"></a>00017 <span class="comment"> EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</span>
<a name="l00018"></a>00018 <span class="comment"> MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL</span>
<a name="l00019"></a>00019 <span class="comment"> THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span>
<a name="l00020"></a>00020 <span class="comment"> SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT</span>
<a name="l00021"></a>00021 <span class="comment"> OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span>
<a name="l00022"></a>00022 <span class="comment"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR</span>
<a name="l00023"></a>00023 <span class="comment"> TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
<a name="l00024"></a>00024 <span class="comment"> SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00025"></a>00025 <span class="comment"></span>
<a name="l00026"></a>00026 <span class="comment"> $Id: elf_8h-source.html 88 2016-01-12 00:11:29Z reddawg $</span>
<a name="l00027"></a>00027 <span class="comment"></span>
<a name="l00028"></a>00028 <span class="comment">*****************************************************************************************/</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef _ELF_H</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define _ELF_H</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="types_8h.html">ubixos/types.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="code" href="sched_8h.html">ubixos/sched.h</a>&gt;</span>
<a name="l00035"></a>00035 
<a name="l00036"></a><a class="code" href="elf_8h.html#43207943042903ad0531e6fa20ba2919">00036</a> <span class="preprocessor">#define elfExecutable 0x002</span>
<a name="l00037"></a><a class="code" href="elf_8h.html#d62afe65170f599ef3b6ea3dba85e4de">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define elfLibrary    0x003</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a><a class="code" href="elf_8h.html#9e2fc1d7696704e230b4d767c173e3b0">00039</a> <span class="preprocessor">#define R_386_NONE      0 </span><span class="comment">/* none    none        */</span>
<a name="l00040"></a><a class="code" href="elf_8h.html#f363b787459afd7e272677d7858572c0">00040</a> <span class="preprocessor">#define R_386_32        1 </span><span class="comment">/* word32  S + A       */</span>
<a name="l00041"></a><a class="code" href="elf_8h.html#d55eb4ccb6e52c4c03f99b34cc8c690b">00041</a> <span class="preprocessor">#define R_386_PC32      2 </span><span class="comment">/* word32  S + A - P   */</span>
<a name="l00042"></a><a class="code" href="elf_8h.html#42f8dd027e6f2384dba2cfa060240c63">00042</a> <span class="preprocessor">#define R_386_GOT32     3 </span><span class="comment">/* word32  G + A - P   */</span>
<a name="l00043"></a><a class="code" href="elf_8h.html#6ee43218883fb9f2836f425615c2da40">00043</a> <span class="preprocessor">#define R_386_PLT32     4 </span><span class="comment">/* word32  L + A - P   */</span>
<a name="l00044"></a><a class="code" href="elf_8h.html#c08872c616d1b9649dc13780f71833b1">00044</a> <span class="preprocessor">#define R_386_COPY      5 </span><span class="comment">/* none    none        */</span>
<a name="l00045"></a><a class="code" href="elf_8h.html#6ab6b058a8dd4e90c49e74415809f867">00045</a> <span class="preprocessor">#define R_386_GLOB_DAT  6 </span><span class="comment">/* word32  S           */</span>
<a name="l00046"></a><a class="code" href="elf_8h.html#4d36bf95ffa6b0f7a369b23938db5aaf">00046</a> <span class="preprocessor">#define R_386_JMP_SLOT  7 </span><span class="comment">/* word32  S           */</span>
<a name="l00047"></a><a class="code" href="elf_8h.html#ee5190154984e6176e1c6804ac13217d">00047</a> <span class="preprocessor">#define R_386_RELATIVE  8 </span><span class="comment">/* word32  B + A       */</span>
<a name="l00048"></a><a class="code" href="elf_8h.html#c2ed0eac08066a8dd368873fcd54ae3c">00048</a> <span class="preprocessor">#define R_386_GOTOFF    9 </span><span class="comment">/* word32  S + A - GOT */</span>
<a name="l00049"></a><a class="code" href="elf_8h.html#69665820640b0fb427ea40c8cd2496ce">00049</a> <span class="preprocessor">#define R_386_GOTPC    10 </span><span class="comment">/* word32  GOT + A - P */</span>
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="comment">/* Elf Types */</span>
<a name="l00053"></a><a class="code" href="elf_8h.html#343a36d721130c5017a5669537e96822">00053</a> <span class="preprocessor">#define ET_NONE         0  // No file type</span>
<a name="l00054"></a><a class="code" href="elf_8h.html#2a91046a80fd753ce3dbfb109212761d">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define ET_REL          1  // Relocatable file</span>
<a name="l00055"></a><a class="code" href="elf_8h.html#942478985eb016311380dee473cc8c3e">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define ET_EXEC         2  // Executable file</span>
<a name="l00056"></a><a class="code" href="elf_8h.html#4373ea3b3d512434ebe2213829b6751b">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define ET_DYN          3  // Shared object file</span>
<a name="l00057"></a><a class="code" href="elf_8h.html#2b9430d26ba60f7a9d65c8d43e54f213">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define ET_CORE         4  // Core file</span>
<a name="l00058"></a><a class="code" href="elf_8h.html#929894d9c68a7d9b8c29211b1e1a7469">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define ET_LOPROC  0xff00  // Processor-specific</span>
<a name="l00059"></a><a class="code" href="elf_8h.html#77894d49f8672fee77686cc7f7ba1a1a">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define ET_HIPROC  0xffff</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="comment">/* End Elf Types */</span>
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 <span class="comment">/* Elf Machine Types */</span>
<a name="l00063"></a><a class="code" href="elf_8h.html#5a14b1234094272355977c59e351a14f">00063</a> <span class="preprocessor">#define EM_NONE       0  // No machine</span>
<a name="l00064"></a><a class="code" href="elf_8h.html#19b0cea9b063bb97e84b0931ebc7d699">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define EM_M32        1  // AT&amp;T WE 32100</span>
<a name="l00065"></a><a class="code" href="elf_8h.html#3d33cb376c76e9fb077ddf5389f8f8b8">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define EM_SPARC      2  // SPARC</span>
<a name="l00066"></a><a class="code" href="elf_8h.html#77301c665274669ba8d05978eb0d299e">00066</a> <span class="preprocessor"></span><span class="preprocessor">#define EM_386        3  // Intel 80386</span>
<a name="l00067"></a><a class="code" href="elf_8h.html#cc74dd2d7cd1e872c2d2f52d64a7982a">00067</a> <span class="preprocessor"></span><span class="preprocessor">#define EM_68K        4  // Motorola 68000</span>
<a name="l00068"></a><a class="code" href="elf_8h.html#66801fe3ae7746ab9386537d236cd4e4">00068</a> <span class="preprocessor"></span><span class="preprocessor">#define EM_88K        5  // Motorola 88000</span>
<a name="l00069"></a><a class="code" href="elf_8h.html#80e7667a64867c4252a1c3a6333514d9">00069</a> <span class="preprocessor"></span><span class="preprocessor">#define EM_860        7  // Intel 80860</span>
<a name="l00070"></a><a class="code" href="elf_8h.html#3168ea327621f9848abb996540342fb6">00070</a> <span class="preprocessor"></span><span class="preprocessor">#define EM_MIPS       8  // MIPS RS3000</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="comment">/* End Elf Machines Types */</span>
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 <span class="comment">/* Elf Version */</span>
<a name="l00074"></a><a class="code" href="elf_8h.html#0307c9d093060e148ecca1c7cfb02429">00074</a> <span class="preprocessor">#define EV_NONE          0  // Invalid version</span>
<a name="l00075"></a><a class="code" href="elf_8h.html#8085a255e82173046afefd2a1c6de930">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define EV_CURRENT       1  // Current version</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="comment">/* End Elf Version */</span>
<a name="l00077"></a>00077 
<a name="l00078"></a>00078 <span class="comment">/* Elf Program Header Types */</span>
<a name="l00079"></a><a class="code" href="elf_8h.html#854729c1dc4623abeaeb765a1b745012">00079</a> <span class="preprocessor">#define PT_NULL          0</span>
<a name="l00080"></a><a class="code" href="elf_8h.html#84d7768fd6c6ece599d297090900cf92">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_LOAD          1</span>
<a name="l00081"></a><a class="code" href="elf_8h.html#2121a2f01c51e8462bfd4d47725649d8">00081</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_DYNAMIC       2</span>
<a name="l00082"></a><a class="code" href="elf_8h.html#bcd3aa15bc567949c1ab6b1abc137710">00082</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_INTERP        3</span>
<a name="l00083"></a><a class="code" href="elf_8h.html#72baf87d62607c7fdccd3b8010d4ce30">00083</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_NOTE          4</span>
<a name="l00084"></a><a class="code" href="elf_8h.html#bff9f38fd394e09e60f5640550a23e46">00084</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_SHLIB         5</span>
<a name="l00085"></a><a class="code" href="elf_8h.html#58ff00be749ca4000074f9b9066a1056">00085</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_PHDR          6</span>
<a name="l00086"></a><a class="code" href="elf_8h.html#d8021c0557cb6451ed6a925ae50c6c3e">00086</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_LOOS          0x60000000</span>
<a name="l00087"></a><a class="code" href="elf_8h.html#b77da073a07d6a452ce9e9a05d4fe17b">00087</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_HIOS          0x6fffffff</span>
<a name="l00088"></a><a class="code" href="elf_8h.html#caa6971207ea507ed02f22ba574b8534">00088</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_LOPROC        0x70000000</span>
<a name="l00089"></a><a class="code" href="elf_8h.html#74427c5909fdced36b41134c11650249">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_HIPROC        0x7fffffff</span>
<a name="l00090"></a><a class="code" href="elf_8h.html#b6ccf19e752eb40b995b86779d55a566">00090</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_GNU_EH_FRAME  0x6474e550</span>
<a name="l00091"></a><a class="code" href="elf_8h.html#f9283bc32e6d3e87d2bab2f55bc1949b">00091</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_GNU_STACK     (PT_LOOS + 0x474e551)</span>
<a name="l00092"></a><a class="code" href="elf_8h.html#b5168e122aeeec290f479c0bec4a891e">00092</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_GNU_RELRO     (PT_LOOS + 0x474e552) </span>
<a name="l00093"></a><a class="code" href="elf_8h.html#7294b5e14e1cf5becf35236381698f48">00093</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_PAX_FLAGS     (PT_LOOS + 0x5041580) </span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>
<a name="l00095"></a>00095 <span class="comment">/* End Elf Program Header Types */</span>
<a name="l00096"></a>00096 
<a name="l00097"></a><a class="code" href="structelfHeader.html">00097</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00098"></a><a class="code" href="structelfHeader.html#ec74b71d266bdbfaed95a9241343c28c">00098</a>   <a class="code" href="types_8h.html#a4e0f27a9aca905e340c06d2dcae843c">uInt8</a>  eIdent[16]; <span class="comment">/* File identification. */</span>
<a name="l00099"></a><a class="code" href="structelfHeader.html#34e52f945d79cca21dc50a8aef79f9e8">00099</a>   <a class="code" href="types_8h.html#3b65128d2644e9b80cec9a69bfa7e094">uInt16</a> eType;      <span class="comment">/* File type. */</span>
<a name="l00100"></a><a class="code" href="structelfHeader.html#260b5d6072fedd8bdb8387c7c57e91ec">00100</a>   <a class="code" href="types_8h.html#3b65128d2644e9b80cec9a69bfa7e094">uInt16</a> eMachine;   <span class="comment">/* Machine architecture. */</span>
<a name="l00101"></a><a class="code" href="structelfHeader.html#d987cee7cf39f478e5f4568e61858792">00101</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>  eVersion;   <span class="comment">/* ELF format version. */</span>
<a name="l00102"></a><a class="code" href="structelfHeader.html#8ff3dd1b27053bc5a2f01afe5403e53b">00102</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>  eEntry;     <span class="comment">/* Entry point. */</span>
<a name="l00103"></a><a class="code" href="structelfHeader.html#aff1ff2cb64932f1e1a1f6cf3b881787">00103</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>  ePhoff;     <span class="comment">/* Program header file offset. */</span>
<a name="l00104"></a><a class="code" href="structelfHeader.html#3d8c518903e5e4db018a336edb6ef204">00104</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>  eShoff;     <span class="comment">/* Section header file offset. */</span>
<a name="l00105"></a><a class="code" href="structelfHeader.html#23280a5f824bab00f6dd02b2dde31c3b">00105</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>  eFlags;     <span class="comment">/* Architecture-specific flags. */</span>
<a name="l00106"></a><a class="code" href="structelfHeader.html#a7ab3dc07bce30b761c0be788b52b15a">00106</a>   <a class="code" href="types_8h.html#3b65128d2644e9b80cec9a69bfa7e094">uInt16</a> eEhsize;    <span class="comment">/* Size of ELF header in bytes. */</span>
<a name="l00107"></a><a class="code" href="structelfHeader.html#6982d944b2fd4b3f11813a8806500828">00107</a>   <a class="code" href="types_8h.html#3b65128d2644e9b80cec9a69bfa7e094">uInt16</a> ePhentsize; <span class="comment">/* Size of program header entry. */</span>
<a name="l00108"></a><a class="code" href="structelfHeader.html#4635401868104caa04fcb5bb60840df6">00108</a>   <a class="code" href="types_8h.html#3b65128d2644e9b80cec9a69bfa7e094">uInt16</a> ePhnum;     <span class="comment">/* Number of program header entries. */</span>
<a name="l00109"></a><a class="code" href="structelfHeader.html#a8a9b01678001673e6d0bdef65274d99">00109</a>   <a class="code" href="types_8h.html#3b65128d2644e9b80cec9a69bfa7e094">uInt16</a> eShentsize; <span class="comment">/* Size of section header entry. */</span>
<a name="l00110"></a><a class="code" href="structelfHeader.html#a5b9594ecad96ed7448dbcf95da7895f">00110</a>   <a class="code" href="types_8h.html#3b65128d2644e9b80cec9a69bfa7e094">uInt16</a> eShnum;     <span class="comment">/* Number of section header entries. */</span>
<a name="l00111"></a><a class="code" href="structelfHeader.html#8842d2d5aed087cd50914a46461d3f40">00111</a>   <a class="code" href="types_8h.html#3b65128d2644e9b80cec9a69bfa7e094">uInt16</a> eShstrndx;  <span class="comment">/* Section name strings section. */</span>
<a name="l00112"></a>00112   } <a class="code" href="structelfHeader.html">elfHeader</a>;
<a name="l00113"></a>00113 
<a name="l00114"></a><a class="code" href="structelfProgramHeader.html">00114</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00115"></a><a class="code" href="structelfProgramHeader.html#5212a5be2811b5095729cc7422364d7a">00115</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> phType;         <span class="comment">/* Entry type. */</span>
<a name="l00116"></a><a class="code" href="structelfProgramHeader.html#93a7c0296fe86a429cf58989956d28ff">00116</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> phOffset;       <span class="comment">/* File offset of contents. */</span>
<a name="l00117"></a><a class="code" href="structelfProgramHeader.html#14f11176e999131fb9be875aeb500447">00117</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> phVaddr;        <span class="comment">/* Virtual address in memory image. */</span>
<a name="l00118"></a><a class="code" href="structelfProgramHeader.html#7d03ba7115810979c58c4f2df8d3edba">00118</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> phPaddr;        <span class="comment">/* Physical address (not used). */</span>
<a name="l00119"></a><a class="code" href="structelfProgramHeader.html#8a5809f3eae9863507db66786c2af3b0">00119</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> phFilesz;       <span class="comment">/* Size of contents in file. */</span>
<a name="l00120"></a><a class="code" href="structelfProgramHeader.html#b5a140ab0f0225a8459f88d905995dd0">00120</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> phMemsz;        <span class="comment">/* Size of contents in memory. */</span>
<a name="l00121"></a><a class="code" href="structelfProgramHeader.html#a2896235f4362e24ef9542cede9f5a6c">00121</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> phFlags;        <span class="comment">/* Access permission flags. */</span>
<a name="l00122"></a><a class="code" href="structelfProgramHeader.html#818c3dde165f8cc3b389f6c38abc8638">00122</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> phAlign;        <span class="comment">/* Alignment in memory and file. */</span>
<a name="l00123"></a>00123   } <a class="code" href="structelfProgramHeader.html">elfProgramHeader</a>;
<a name="l00124"></a>00124 
<a name="l00125"></a><a class="code" href="structelfSectionHeader.html">00125</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00126"></a><a class="code" href="structelfSectionHeader.html#2e986e7bb61f39e9f8acb689d69288af">00126</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shName;        <span class="comment">/* Section name (index into the section header string table). */</span>
<a name="l00127"></a><a class="code" href="structelfSectionHeader.html#92e73a5bceb23de152ec81934565616f">00127</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shType;        <span class="comment">/* Section type. */</span>
<a name="l00128"></a><a class="code" href="structelfSectionHeader.html#3d738d7ebe3b6eed2b50147b42122d33">00128</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shFlags;       <span class="comment">/* Section flags. */</span>
<a name="l00129"></a><a class="code" href="structelfSectionHeader.html#6f825e4c27a07a0ea09d7f219f0a3028">00129</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shAddr;        <span class="comment">/* Address in memory image. */</span>
<a name="l00130"></a><a class="code" href="structelfSectionHeader.html#bdc6319f2f19c7c1c33bf2f0d86b6d58">00130</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shOffset;      <span class="comment">/* Offset in file. */</span>
<a name="l00131"></a><a class="code" href="structelfSectionHeader.html#285d41cc0ad6e460792b9524c6db5345">00131</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shSize;        <span class="comment">/* Size in bytes. */</span>
<a name="l00132"></a><a class="code" href="structelfSectionHeader.html#51692e8503d83cbfdcbbe62c35d0fc0a">00132</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shLink;        <span class="comment">/* Index of a related section. */</span>
<a name="l00133"></a><a class="code" href="structelfSectionHeader.html#1a4022dc1f0ea45729ebd64492df6e33">00133</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shInfo;        <span class="comment">/* Depends on section type. */</span>
<a name="l00134"></a><a class="code" href="structelfSectionHeader.html#4e415271587c80ff8f9c6c8cb2008603">00134</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shAddralign;   <span class="comment">/* Alignment in bytes. */</span>
<a name="l00135"></a><a class="code" href="structelfSectionHeader.html#7cc42511da161c23c1fc1c2b205f4625">00135</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> shEntsize;     <span class="comment">/* Size of each entry in section. */</span>
<a name="l00136"></a>00136   } <a class="code" href="structelfSectionHeader.html">elfSectionHeader</a>;
<a name="l00137"></a>00137 
<a name="l00138"></a><a class="code" href="structelfPltInfo.html">00138</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00139"></a><a class="code" href="structelfPltInfo.html#fbe08b823da04c152efbf47537fc5aab">00139</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> pltOffset;
<a name="l00140"></a><a class="code" href="structelfPltInfo.html#386532ff3627c9a0c6d93b9a8ba7d945">00140</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> pltInfo;
<a name="l00141"></a>00141   } <a class="code" href="structelfPltInfo.html">elfPltInfo</a>;
<a name="l00142"></a>00142 
<a name="l00143"></a><a class="code" href="structelfDynSym.html">00143</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00144"></a><a class="code" href="structelfDynSym.html#17fc1d5609c012ee49bc1f3d600eec8a">00144</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> dynName;
<a name="l00145"></a><a class="code" href="structelfDynSym.html#406fd05272c66180875f97e99d2e988c">00145</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> dynValue;
<a name="l00146"></a><a class="code" href="structelfDynSym.html#b2687fa4d97621e5511c4afe6f58881d">00146</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> dynSize;
<a name="l00147"></a><a class="code" href="structelfDynSym.html#fe497b33dec9e19727d2fbd567a220fd">00147</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> dynInfo;
<a name="l00148"></a>00148   } <a class="code" href="structelfDynSym.html">elfDynSym</a>;
<a name="l00149"></a>00149 
<a name="l00150"></a><a class="code" href="structelfDynamic.html">00150</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00151"></a><a class="code" href="structelfDynamic.html#4bd6fa8175c5a762032251968c39765c">00151</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> dynVal;
<a name="l00152"></a><a class="code" href="structelfDynamic.html#5d085643b6296e0f247faafebac55193">00152</a>   <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> dynPtr;
<a name="l00153"></a>00153   } <a class="code" href="structelfDynamic.html">elfDynamic</a>;
<a name="l00154"></a>00154 
<a name="l00155"></a><a class="code" href="structElf__Auxargs.html">00155</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00156"></a><a class="code" href="structElf__Auxargs.html#3a14df95494a03a2c51f21759b8e5b26">00156</a>         <a class="code" href="types_8h.html#6f6221103820f185abcc62b874665a93">int32_t</a>          execfd;
<a name="l00157"></a><a class="code" href="structElf__Auxargs.html#15dd42590b2807011c079e1e499b1030">00157</a>         <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a>        phdr;
<a name="l00158"></a><a class="code" href="structElf__Auxargs.html#0775837104814be2c22ebf306c52d34f">00158</a>         <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a>        phent;
<a name="l00159"></a><a class="code" href="structElf__Auxargs.html#be98a612999706e049999027bb5404e9">00159</a>         <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a>        phnum;
<a name="l00160"></a><a class="code" href="structElf__Auxargs.html#e05c934140ddd5707467e9911d51c7ea">00160</a>         <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a>        pagesz;
<a name="l00161"></a><a class="code" href="structElf__Auxargs.html#f66e5b831167efd5b05090a68acd63c9">00161</a>         <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a>        base;
<a name="l00162"></a><a class="code" href="structElf__Auxargs.html#854857ce9ea1c1bfc5744586c12893c9">00162</a>         <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a>        flags;
<a name="l00163"></a><a class="code" href="structElf__Auxargs.html#62da88643e4ee0dc50f091f28b9becb9">00163</a>         <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a>        entry;
<a name="l00164"></a><a class="code" href="structElf__Auxargs.html#3dbace009fbbd068d1a894479ad0fa7b">00164</a>         <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a>        trace;
<a name="l00165"></a>00165 } <a class="code" href="structElf__Auxargs.html">Elf_Auxargs</a>;
<a name="l00166"></a>00166 
<a name="l00167"></a>00167 <span class="keywordtype">char</span> *<a class="code" href="elf_8h.html#311110a36ffc1b10813ae5c4a357bbf4">elfGetShType</a>(<span class="keywordtype">int</span>);
<a name="l00168"></a>00168 <span class="keywordtype">char</span> *<a class="code" href="elf_8h.html#cc8cfb0f90cf2fea91e0713719c49506">elfGetPhType</a>(<span class="keywordtype">int</span>);
<a name="l00169"></a>00169 <span class="keywordtype">char</span> *<a class="code" href="elf_8h.html#18371af6e681af62767a92ac64af1ebb">elfGetRelType</a>(<span class="keywordtype">int</span>);
<a name="l00170"></a>00170 <span class="keywordtype">int</span> <a class="code" href="elf_8h.html#f11ec9e50bcff723428b0c911a177fd0">elf_loadfile</a>(<a class="code" href="structtaskStruct.html">kTask_t</a> *p,<span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structfile.html">file</a>,<a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> *addr,<a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> *entry);
<a name="l00171"></a>00171 
<a name="l00172"></a><a class="code" href="elf_8h.html#8d1ac0f35a8999a4a8a3350ca95ab54b">00172</a> <span class="preprocessor">#define ELF32_R_SYM(i)      ((i)&gt;&gt;8)</span>
<a name="l00173"></a><a class="code" href="elf_8h.html#a4ffd69f2c1c03229686bfa3a898db00">00173</a> <span class="preprocessor"></span><span class="preprocessor">#define ELF32_R_TYPE(i)     ((unsigned char)(i))</span>
<a name="l00174"></a><a class="code" href="elf_8h.html#eb7c1eec87bedbd8241d71ce4617d72c">00174</a> <span class="preprocessor"></span><span class="preprocessor">#define ELF32_R_INFO(s, t)  ((s)&lt;&lt;8+(unsigned char)(t))</span>
<a name="l00175"></a>00175 <span class="preprocessor"></span>
<a name="l00176"></a>00176 <span class="preprocessor">#endif</span>
<a name="l00177"></a>00177 <span class="preprocessor"></span>
<a name="l00178"></a>00178 <span class="comment">/***</span>
<a name="l00179"></a>00179 <span class="comment"> $Log: elf_8h-source.html,v $
<a name="l00179"></a>00179 <span class="comment"> Revision 1.7  2006/12/15 17:47:05  reddawg
<a name="l00179"></a>00179 <span class="comment"> Updates
<a name="l00179"></a>00179 <span class="comment"></span>
<a name="l00180"></a>00180 <span class="comment"> Revision 1.2  2006/12/15 15:43:46  reddawg</span>
<a name="l00181"></a>00181 <span class="comment"> Changes</span>
<a name="l00182"></a>00182 <span class="comment"></span>
<a name="l00183"></a>00183 <span class="comment"> Revision 1.1.1.1  2006/06/01 12:46:13  reddawg</span>
<a name="l00184"></a>00184 <span class="comment"> ubix2</span>
<a name="l00185"></a>00185 <span class="comment"></span>
<a name="l00186"></a>00186 <span class="comment"> Revision 1.2  2005/10/12 00:13:37  reddawg</span>
<a name="l00187"></a>00187 <span class="comment"> Removed</span>
<a name="l00188"></a>00188 <span class="comment"></span>
<a name="l00189"></a>00189 <span class="comment"> Revision 1.1.1.1  2005/09/26 17:23:54  reddawg</span>
<a name="l00190"></a>00190 <span class="comment"> no message</span>
<a name="l00191"></a>00191 <span class="comment"></span>
<a name="l00192"></a>00192 <span class="comment"> Revision 1.7  2004/09/11 01:20:08  apwillia</span>
<a name="l00193"></a>00193 <span class="comment"> Clean up 'Unhandled Header' printfs when compiled in linux</span>
<a name="l00194"></a>00194 <span class="comment"></span>
<a name="l00195"></a>00195 <span class="comment"> Revision 1.6  2004/06/16 14:04:51  reddawg</span>
<a name="l00196"></a>00196 <span class="comment"> Renamed a typedef</span>
<a name="l00197"></a>00197 <span class="comment"></span>
<a name="l00198"></a>00198 <span class="comment"> Revision 1.5  2004/06/14 12:20:54  reddawg</span>
<a name="l00199"></a>00199 <span class="comment"> notes: many bugs repaired and ld works 100% now.</span>
<a name="l00200"></a>00200 <span class="comment"></span>
<a name="l00201"></a>00201 <span class="comment"> Revision 1.4  2004/06/12 01:27:26  reddawg</span>
<a name="l00202"></a>00202 <span class="comment"> shared objects: yes we almost fully support shared objects</span>
<a name="l00203"></a>00203 <span class="comment"></span>
<a name="l00204"></a>00204 <span class="comment"> Revision 1.3  2004/05/21 15:20:00  reddawg</span>
<a name="l00205"></a>00205 <span class="comment"> Cleaned up</span>
<a name="l00206"></a>00206 <span class="comment"></span>
<a name="l00207"></a>00207 <span class="comment"></span>
<a name="l00208"></a>00208 <span class="comment"> END</span>
<a name="l00209"></a>00209 <span class="comment"> ***/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Dec 15 11:18:54 2006 for UbixOS V2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>