1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- This file documents the GNU linker LD 4(GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 5version 2.36.1. 6 7Copyright (C) 1991-2021 Free Software Foundation, Inc. 8 9Permission is granted to copy, distribute and/or modify this document 10under the terms of the GNU Free Documentation License, Version 1.3 11or any later version published by the Free Software Foundation; 12with no Invariant Sections, with no Front-Cover Texts, and with no 13Back-Cover Texts. A copy of the license is included in the 14section entitled "GNU Free Documentation License". --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>LD: SPU ELF</title> 18 19<meta name="description" content="LD: SPU ELF"> 20<meta name="keywords" content="LD: SPU ELF"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="index.html#Top" rel="start" title="Top"> 26<link href="LD-Index.html#LD-Index" rel="index" title="LD Index"> 27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="Machine-Dependent.html#Machine-Dependent" rel="up" title="Machine Dependent"> 29<link href="TI-COFF.html#TI-COFF" rel="next" title="TI COFF"> 30<link href="S_002f390-ELF.html#S_002f390-ELF" rel="previous" title="S/390 ELF"> 31<style type="text/css"> 32<!-- 33a.summary-letter {text-decoration: none} 34blockquote.smallquotation {font-size: smaller} 35div.display {margin-left: 3.2em} 36div.example {margin-left: 3.2em} 37div.indentedblock {margin-left: 3.2em} 38div.lisp {margin-left: 3.2em} 39div.smalldisplay {margin-left: 3.2em} 40div.smallexample {margin-left: 3.2em} 41div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 42div.smalllisp {margin-left: 3.2em} 43kbd {font-style:oblique} 44pre.display {font-family: inherit} 45pre.format {font-family: inherit} 46pre.menu-comment {font-family: serif} 47pre.menu-preformatted {font-family: serif} 48pre.smalldisplay {font-family: inherit; font-size: smaller} 49pre.smallexample {font-size: smaller} 50pre.smallformat {font-family: inherit; font-size: smaller} 51pre.smalllisp {font-size: smaller} 52span.nocodebreak {white-space:nowrap} 53span.nolinebreak {white-space:nowrap} 54span.roman {font-family:serif; font-weight:normal} 55span.sansserif {font-family:sans-serif; font-weight:normal} 56ul.no-bullet {list-style: none} 57--> 58</style> 59 60 61</head> 62 63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 64<a name="SPU-ELF"></a> 65<div class="header"> 66<p> 67Next: <a href="TI-COFF.html#TI-COFF" accesskey="n" rel="next">TI COFF</a>, Previous: <a href="S_002f390-ELF.html#S_002f390-ELF" accesskey="p" rel="previous">S/390 ELF</a>, Up: <a href="Machine-Dependent.html#Machine-Dependent" accesskey="u" rel="up">Machine Dependent</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LD-Index.html#LD-Index" title="Index" rel="index">Index</a>]</p> 68</div> 69<hr> 70<a name="ld-and-SPU-ELF-Support"></a> 71<h3 class="section">5.14 <code>ld</code> and SPU ELF Support</h3> 72 73<a name="index-SPU-ELF-options"></a> 74<dl compact="compact"> 75<dd> 76<a name="index-SPU-plugins"></a> 77<a name="index-_002d_002dplugin"></a> 78</dd> 79<dt><samp>--plugin</samp></dt> 80<dd><p>This option marks an executable as a PIC plugin module. 81</p> 82<a name="index-SPU-overlays"></a> 83<a name="index-_002d_002dno_002doverlays"></a> 84</dd> 85<dt><samp>--no-overlays</samp></dt> 86<dd><p>Normally, <code>ld</code> recognizes calls to functions within overlay 87regions, and redirects such calls to an overlay manager via a stub. 88<code>ld</code> also provides a built-in overlay manager. This option 89turns off all this special overlay handling. 90</p> 91<a name="index-SPU-overlay-stub-symbols"></a> 92<a name="index-_002d_002demit_002dstub_002dsyms-2"></a> 93</dd> 94<dt><samp>--emit-stub-syms</samp></dt> 95<dd><p>This option causes <code>ld</code> to label overlay stubs with a local 96symbol that encodes the stub type and destination. 97</p> 98<a name="index-SPU-extra-overlay-stubs"></a> 99<a name="index-_002d_002dextra_002doverlay_002dstubs"></a> 100</dd> 101<dt><samp>--extra-overlay-stubs</samp></dt> 102<dd><p>This option causes <code>ld</code> to add overlay call stubs on all 103function calls out of overlay regions. Normally stubs are not added 104on calls to non-overlay regions. 105</p> 106<a name="index-SPU-local-store-size"></a> 107<a name="index-_002d_002dlocal_002dstore_003dlo_003ahi"></a> 108</dd> 109<dt><samp>--local-store=lo:hi</samp></dt> 110<dd><p><code>ld</code> usually checks that a final executable for SPU fits in 111the address range 0 to 256k. This option may be used to change the 112range. Disable the check entirely with <samp>--local-store=0:0</samp>. 113</p> 114<a name="index-SPU"></a> 115<a name="index-_002d_002dstack_002danalysis"></a> 116</dd> 117<dt><samp>--stack-analysis</samp></dt> 118<dd><p>SPU local store space is limited. Over-allocation of stack space 119unnecessarily limits space available for code and data, while 120under-allocation results in runtime failures. If given this option, 121<code>ld</code> will provide an estimate of maximum stack usage. 122<code>ld</code> does this by examining symbols in code sections to 123determine the extents of functions, and looking at function prologues 124for stack adjusting instructions. A call-graph is created by looking 125for relocations on branch instructions. The graph is then searched 126for the maximum stack usage path. Note that this analysis does not 127find calls made via function pointers, and does not handle recursion 128and other cycles in the call graph. Stack usage may be 129under-estimated if your code makes such calls. Also, stack usage for 130dynamic allocation, e.g. alloca, will not be detected. If a link map 131is requested, detailed information about each function’s stack usage 132and calls will be given. 133</p> 134<a name="index-SPU-1"></a> 135<a name="index-_002d_002demit_002dstack_002dsyms"></a> 136</dd> 137<dt><samp>--emit-stack-syms</samp></dt> 138<dd><p>This option, if given along with <samp>--stack-analysis</samp> will result 139in <code>ld</code> emitting stack sizing symbols for each function. 140These take the form <code>__stack_<function_name></code> for global 141functions, and <code>__stack_<number>_<function_name></code> for static 142functions. <code><number></code> is the section id in hex. The value of 143such symbols is the stack requirement for the corresponding function. 144The symbol size will be zero, type <code>STT_NOTYPE</code>, binding 145<code>STB_LOCAL</code>, and section <code>SHN_ABS</code>. 146</p></dd> 147</dl> 148 149 150 151<hr> 152<div class="header"> 153<p> 154Next: <a href="TI-COFF.html#TI-COFF" accesskey="n" rel="next">TI COFF</a>, Previous: <a href="S_002f390-ELF.html#S_002f390-ELF" accesskey="p" rel="previous">S/390 ELF</a>, Up: <a href="Machine-Dependent.html#Machine-Dependent" accesskey="u" rel="up">Machine Dependent</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LD-Index.html#LD-Index" title="Index" rel="index">Index</a>]</p> 155</div> 156 157 158 159</body> 160</html> 161