📄 linking_and_loading_ported_program.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><p>Linking and Loading program ported from VDSP</p><h2><a name="using_gnu_linker_script" id="using_gnu_linker_script">Using Gnu Linker script</a></h2><div class="level2"><p> For GNU Linker script please refer to: <a href="http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_chapter/ld_toc.html" class="urlextern" title="http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_chapter/ld_toc.html" rel="nofollow">http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_chapter/ld_toc.html</a></p><p>If the ported program is a library, you will need to link the library with your uClinux application. You may use Gnu Linker Scripts to direct the Gnu linker. </p><ul><li class="level1"><div class="li"> Define Sections in Linker scripts:</div></li></ul><p> By default, the Linker uses Linker scripts defined in <bfin-uclinux-toolchain>/bfin-uclinux/lib/ldscripts/. when the ported library defines its sections, you may dump the scripts and define your section in the file: </p><p>For example, supposing the library defines “my_data_1” section and you want the linker copy this secions from all the source files to data section: </p><pre class="code"># Dump default linker script./bfin-uclinux-ld --verbose > my_ld.x# Modify my_ld.x, add in the .data{} definition:SECTIONS{ ... .data { *(.data .data.* .gnu.linkonce.d.*) *(my_data_1) /* Add my data secton here */ }}</pre></div><!-- SECTION [47-] --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -