1<html lang="en"> 2<head> 3<title>SPU ELF - Untitled</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Untitled"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent"> 9<link rel="prev" href="PowerPC64-ELF64.html#PowerPC64-ELF64" title="PowerPC64 ELF64"> 10<link rel="next" href="TI-COFF.html#TI-COFF" title="TI COFF"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13This file documents the GNU linker LD 14(Sourcery CodeBench Lite 2011.09-69) 15version 2.21.53. 16 17Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 182001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 19 20Permission is granted to copy, distribute and/or modify this document 21under the terms of the GNU Free Documentation License, Version 1.3 22or any later version published by the Free Software Foundation; 23with no Invariant Sections, with no Front-Cover Texts, and with no 24Back-Cover Texts. A copy of the license is included in the 25section entitled ``GNU Free Documentation License''.--> 26<meta http-equiv="Content-Style-Type" content="text/css"> 27<style type="text/css"><!-- 28 pre.display { font-family:inherit } 29 pre.format { font-family:inherit } 30 pre.smalldisplay { font-family:inherit; font-size:smaller } 31 pre.smallformat { font-family:inherit; font-size:smaller } 32 pre.smallexample { font-size:smaller } 33 pre.smalllisp { font-size:smaller } 34 span.sc { font-variant:small-caps } 35 span.roman { font-family:serif; font-weight:normal; } 36 span.sansserif { font-family:sans-serif; font-weight:normal; } 37--></style> 38<link rel="stylesheet" type="text/css" href="../cs.css"> 39</head> 40<body> 41<div class="node"> 42<a name="SPU-ELF"></a> 43<p> 44Next: <a rel="next" accesskey="n" href="TI-COFF.html#TI-COFF">TI COFF</a>, 45Previous: <a rel="previous" accesskey="p" href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a>, 46Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a> 47<hr> 48</div> 49 50<h3 class="section">4.12 <samp><span class="command">ld</span></samp> and SPU ELF Support</h3> 51 52<p><a name="index-SPU-ELF-options-660"></a> 53 54<a name="index-SPU-plugins-661"></a> 55<a name="index-g_t_002d_002dplugin-662"></a> 56<dl><dt><samp><span class="option">--plugin</span></samp><dd>This option marks an executable as a PIC plugin module. 57 58 <p><a name="index-SPU-overlays-663"></a><a name="index-g_t_002d_002dno_002doverlays-664"></a><br><dt><samp><span class="option">--no-overlays</span></samp><dd>Normally, <samp><span class="command">ld</span></samp> recognizes calls to functions within overlay 59regions, and redirects such calls to an overlay manager via a stub. 60<samp><span class="command">ld</span></samp> also provides a built-in overlay manager. This option 61turns off all this special overlay handling. 62 63 <p><a name="index-SPU-overlay-stub-symbols-665"></a><a name="index-g_t_002d_002demit_002dstub_002dsyms-666"></a><br><dt><samp><span class="option">--emit-stub-syms</span></samp><dd>This option causes <samp><span class="command">ld</span></samp> to label overlay stubs with a local 64symbol that encodes the stub type and destination. 65 66 <p><a name="index-SPU-extra-overlay-stubs-667"></a><a name="index-g_t_002d_002dextra_002doverlay_002dstubs-668"></a><br><dt><samp><span class="option">--extra-overlay-stubs</span></samp><dd>This option causes <samp><span class="command">ld</span></samp> to add overlay call stubs on all 67function calls out of overlay regions. Normally stubs are not added 68on calls to non-overlay regions. 69 70 <p><a name="index-SPU-local-store-size-669"></a><a name="index-g_t_002d_002dlocal_002dstore_003dlo_003ahi-670"></a><br><dt><samp><span class="option">--local-store=lo:hi</span></samp><dd><samp><span class="command">ld</span></samp> usually checks that a final executable for SPU fits in 71the address range 0 to 256k. This option may be used to change the 72range. Disable the check entirely with <samp><span class="option">--local-store=0:0</span></samp>. 73 74 <p><a name="index-SPU-671"></a><a name="index-g_t_002d_002dstack_002danalysis-672"></a><br><dt><samp><span class="option">--stack-analysis</span></samp><dd>SPU local store space is limited. Over-allocation of stack space 75unnecessarily limits space available for code and data, while 76under-allocation results in runtime failures. If given this option, 77<samp><span class="command">ld</span></samp> will provide an estimate of maximum stack usage. 78<samp><span class="command">ld</span></samp> does this by examining symbols in code sections to 79determine the extents of functions, and looking at function prologues 80for stack adjusting instructions. A call-graph is created by looking 81for relocations on branch instructions. The graph is then searched 82for the maximum stack usage path. Note that this analysis does not 83find calls made via function pointers, and does not handle recursion 84and other cycles in the call graph. Stack usage may be 85under-estimated if your code makes such calls. Also, stack usage for 86dynamic allocation, e.g. alloca, will not be detected. If a link map 87is requested, detailed information about each function's stack usage 88and calls will be given. 89 90 <p><a name="index-SPU-673"></a><a name="index-g_t_002d_002demit_002dstack_002dsyms-674"></a><br><dt><samp><span class="option">--emit-stack-syms</span></samp><dd>This option, if given along with <samp><span class="option">--stack-analysis</span></samp> will result 91in <samp><span class="command">ld</span></samp> emitting stack sizing symbols for each function. 92These take the form <code>__stack_<function_name></code> for global 93functions, and <code>__stack_<number>_<function_name></code> for static 94functions. <code><number></code> is the section id in hex. The value of 95such symbols is the stack requirement for the corresponding function. 96The symbol size will be zero, type <code>STT_NOTYPE</code>, binding 97<code>STB_LOCAL</code>, and section <code>SHN_ABS</code>. 98</dl> 99 100 </body></html> 101 102