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

📄 linking.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><h2><a name="linking" id="linking">Linking</a></h2><div class="level2"><p> uClinux has optimized the binary loader using a special form of <strong>flat</strong> file format</p><p>A flat file contains a header plus text and data sections and includes basic relocation information and a compiler generated Global Offset Table. This flat file is recognized by the kernel which loads the file into a memory area and then processes all the fixups required to make the code work at the loaded address.</p><p>The <strong>normal</strong> gcc compile and link process has to be <strong><em>interrupted</em></strong> to allow the extra processing to be used to create the flat file output structure.</p><p>Normally a compile and link process that attempts to produce a fully linked executable would use the <strong>bfin-uclinux-ld</strong> utility to produce a relocatable <strong>elf</strong> format file.</p><p>To allow this process to be intercepted, the <strong>bfin-uclinux-ld</strong> command is replaced by a script. This script will call the flat file generator <strong>bfin-uclinux-elf2flt</strong> after <strong><em>normal</em></strong> linking has been  completed. </p><p>Under these circumstances  the actual toolchain linker executable is called <strong>bfin-uclinux-ld.real</strong></p><p>An example of the <strong><em>interceptor</em></strong> script.</p><pre class="code">#!/bin/sh## allow us to do flat processing if the flag -Wl,-elf2flt (or -elf2flt)  to# the 'C' compiler or linker respectively## uses the env. var FLTFLAGS as extra parameters to pass to elf2flt# arguments given like -Wl,-elf2flt=&quot;-b 10000 -v&quot; are given before FLTFLAGS#...LINKER=&quot;$0.real&quot;            # the original renamed-linkerELF2FLT=&quot;`expr $0 : '\(.*\)ld'`elf2flt&quot;TOOLDIR=&quot;`dirname $0`&quot;      # let gcc find the tools for usSHARED_ID=&quot;&quot;NEWLDSCRIPT=&quot;&quot;if expr &quot;$*&quot; : &quot;.*-elf2flt.*&quot; &gt; /dev/nullthen...[    Steps to do this are not shown for clarity  but here we  attempt to fully resolve the executable and then convert to  a flat file using elf2flt]...# otherwise pretend we aren't here#exec $LINKER &quot;$@&quot;</pre><p> Click <a href="http://www.gnu.org/software/binutils/manual/ld-2.9.1/ld.html" class="urlextern" title="http://www.gnu.org/software/binutils/manual/ld-2.9.1/ld.html"  rel="nofollow">here</a> for more information on the GNU linker. </p></div></body></html>

⌨️ 快捷键说明

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