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

📄 elf_and_flat.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>  <title></title>  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><div class="toc"><div class="tocheader toctoggle" id="toc__header">Table of Contents</div><div id="toc__inside"><ul class="toc"><li class="level1"><div class="li"><span class="li"><a href="#executable_file_formats" class="toc">Executable file formats</a></span></div><ul class="toc"><li class="level2"><div class="li"><span class="li"><a href="#flat_file_support" class="toc">Flat File Support</a></span></div></li><li class="level2"><div class="li"><span class="li"><a href="#elf_file_support" class="toc">ELF File Support</a></span></div></li><li class="level2"><div class="li"><span class="li"><a href="#more_information" class="toc">More information</a></span></div></li></ul></li></ul></div></div><h1><a name="executable_file_formats" id="executable_file_formats">Executable file formats</a></h1><div class="level1"><p> Files can be in two basic formats in Blackfin/uClinux:<br/> Both formats support static and dynamic linking (shared libraries), although it is much easier to use and create shared libraries with ELF.  Only ELF supports dynamic loading(<code>dlopen()</code>, <code>dlsym()</code>, <code>dlclose()</code>), and the standard method for creating and maintaining shared libraries.</p></div><!-- SECTION [1-912] --><h2><a name="flat_file_support" id="flat_file_support">Flat File Support</a></h2><div class="level2"><p>The BFLT format is used since it allows code and data to be relocated after loading them at arbitrary memory locations, which is needed on systems without an MMU.  Compared with ELF format, BFLT format has simpler header, smaller size and is quicker to load (relocate).Since it is normally used in embedded systems, where size is key, it also places an emphasis on reducing the storage requirements.  It includes only those parts of the executable that are needed for loading, while normal ELF binaries include much more data, such as symbol tables and debugging information.</p><p>Flat file support is on by default; it can be controlled with the following kernel configuration option: </p><pre class="code">Linux Kernel Configuration Executable file formats  ---&gt;  [ ] Kernel support for FDPIC ELF binaries &lt;*&gt; Kernel support for flat binaries     [ ]   Enable ZFLAT support     [ ]   Enable shared FLAT support </pre><p>Here, support for compressed FLAT files, or shared FLAT libraries can be turned on.  Turning on shared FLAT support here will cause the uClinux-dist build system to build a shared C library.</p><p>Whether uClibc is built as flat or ELF is controlled in uClibc&rsquo;s config file; two defaults are provided in <code>uClibc/extra/Configs/Config.bfin.default</code> and <code>uClibc/extra/Configs/Config.bfinfdpic.default</code>.  To choose a flat uClibc: </p><pre class="code">rgetz@home:~/todayscvs/kernel/uClinux-dist/uClibc&gt; cp ./extra/Configs/Config.bfin.default ./.configrgetz@home:~/todayscvs/kernel/uClinux-dist/uClibc&gt; make oldconfig   </pre></div><!-- SECTION [913-2461] --><h2><a name="elf_file_support" id="elf_file_support">ELF File Support</a></h2><div class="level2"><p>ELF Files may be larger (due to the extra symbol information) and run slower than a FLAT file (since a slightly less efficient calling convention is used).  The main advantage is the ease with which shared libraries can be created and used, and the option to use dynamic loading.  Everything that can be done with shared objects on a desktop Linux system can also be done under uClinux on the Blackfin when ELF binaries are used.</p><p>To ensure the kernel has ELF support, there needs to be some kernel configuration made:</p><pre class="code">Linux Kernel Configuration Executable file formats  ---&gt;  [*] Kernel support for FDPIC ELF binaries &lt;*&gt; Kernel support for flat binaries     [ ]   Enable ZFLAT support     [ ]   Enable shared FLAT support Blackfin Build Options   [*] Build FD-PIC ELF binaries (requires matching uClibc) </pre><p>Also, uClibc must be configured for ELF Files: </p><pre class="code">rgetz@home:~/todayscvs/kernel/uClinux-dist/uClibc&gt; cp ./extra/Configs/Config.bfinfdpic.default ./.configrgetz@home:~/todayscvs/kernel/uClinux-dist/uClibc&gt; make oldconfig   </pre></div><!-- SECTION [2462-3559] --><h2><a name="more_information" id="more_information">More information</a></h2><div class="level2"><ul><li class="level1"><div class="li"> An introduction on BFLT format: <a href="http://www.ucdot.org/article.pl?sid=02/08/28/0434210&amp;mode=thread" class="urlextern" title="http://www.ucdot.org/article.pl?sid=02/08/28/0434210&amp;mode=thread"  rel="nofollow">http://www.ucdot.org/article.pl?sid=02/08/28/0434210&amp;mode=thread</a></div></li></ul></div><!-- SECTION [3560-] --></body></html>

⌨️ 快捷键说明

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