• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/ld.html/
1<html lang="en">
2<head>
3<title>PowerPC64 ELF64 - 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="PowerPC-ELF32.html#PowerPC-ELF32" title="PowerPC ELF32">
10<link rel="next" href="SPU-ELF.html#SPU-ELF" title="SPU ELF">
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="PowerPC64-ELF64"></a>
43<p>
44Next:&nbsp;<a rel="next" accesskey="n" href="SPU-ELF.html#SPU-ELF">SPU ELF</a>,
45Previous:&nbsp;<a rel="previous" accesskey="p" href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a>,
46Up:&nbsp;<a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
47<hr>
48</div>
49
50<h3 class="section">4.11 <samp><span class="command">ld</span></samp> and PowerPC64 64-bit ELF Support</h3>
51
52<p><a name="index-PowerPC64-ELF64-options-642"></a>
53     
54<a name="index-PowerPC64-stub-grouping-643"></a>
55<a name="index-g_t_002d_002dstub_002dgroup_002dsize-644"></a>
56<dl><dt><samp><span class="option">--stub-group-size</span></samp><dd>Long branch stubs, PLT call stubs  and TOC adjusting stubs are placed
57by <samp><span class="command">ld</span></samp> in stub sections located between groups of input sections. 
58&lsquo;<samp><span class="samp">--stub-group-size</span></samp>&rsquo; specifies the maximum size of a group of input
59sections handled by one stub section.  Since branch offsets are signed,
60a stub section may serve two groups of input sections, one group before
61the stub section, and one group after it.  However, when using
62conditional branches that require stubs, it may be better (for branch
63prediction) that stub sections only serve one group of input sections. 
64A negative value for &lsquo;<samp><span class="samp">N</span></samp>&rsquo; chooses this scheme, ensuring that
65branches to stubs always use a negative offset.  Two special values of
66&lsquo;<samp><span class="samp">N</span></samp>&rsquo; are recognized, &lsquo;<samp><span class="samp">1</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-1</span></samp>&rsquo;.  These both instruct
67<samp><span class="command">ld</span></samp> to automatically size input section groups for the branch types
68detected, with the same behaviour regarding stub placement as other
69positive or negative values of &lsquo;<samp><span class="samp">N</span></samp>&rsquo; respectively.
70
71     <p>Note that &lsquo;<samp><span class="samp">--stub-group-size</span></samp>&rsquo; does not split input sections.  A
72single input section larger than the group size specified will of course
73create a larger group (of one section).  If input sections are too
74large, it may not be possible for a branch to reach its stub.
75
76     <p><a name="index-PowerPC64-stub-symbols-645"></a><a name="index-g_t_002d_002demit_002dstub_002dsyms-646"></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 linker stubs with a local
77symbol that encodes the stub type and destination.
78
79     <p><a name="index-PowerPC64-dot-symbols-647"></a><a name="index-g_t_002d_002ddotsyms-648"></a><a name="index-g_t_002d_002dno_002ddotsyms-649"></a><br><dt><samp><span class="option">--dotsyms, --no-dotsyms</span></samp><dd>These two options control how <samp><span class="command">ld</span></samp> interprets version patterns
80in a version script.  Older PowerPC64 compilers emitted both a
81function descriptor symbol with the same name as the function, and a
82code entry symbol with the name prefixed by a dot (&lsquo;<samp><span class="samp">.</span></samp>&rsquo;).  To
83properly version a function &lsquo;<samp><span class="samp">foo</span></samp>&rsquo;, the version script thus needs
84to control both &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; and &lsquo;<samp><span class="samp">.foo</span></samp>&rsquo;.  The option
85&lsquo;<samp><span class="samp">--dotsyms</span></samp>&rsquo;, on by default, automatically adds the required
86dot-prefixed patterns.  Use &lsquo;<samp><span class="samp">--no-dotsyms</span></samp>&rsquo; to disable this
87feature.
88
89     <p><a name="index-PowerPC64-TLS-optimization-650"></a><a name="index-g_t_002d_002dno_002dtls_002doptimize-651"></a><br><dt><samp><span class="option">--no-tls-optimize</span></samp><dd>PowerPC64 <samp><span class="command">ld</span></samp> normally performs some optimization of code
90sequences used to access Thread-Local Storage.  Use this option to
91disable the optimization.
92
93     <p><a name="index-PowerPC64-OPD-optimization-652"></a><a name="index-g_t_002d_002dno_002dopd_002doptimize-653"></a><br><dt><samp><span class="option">--no-opd-optimize</span></samp><dd>PowerPC64 <samp><span class="command">ld</span></samp> normally removes <code>.opd</code> section entries
94corresponding to deleted link-once functions, or functions removed by
95the action of &lsquo;<samp><span class="samp">--gc-sections</span></samp>&rsquo; or linker script <code>/DISCARD/</code>. 
96Use this option to disable <code>.opd</code> optimization.
97
98     <p><a name="index-PowerPC64-OPD-spacing-654"></a><a name="index-g_t_002d_002dnon_002doverlapping_002dopd-655"></a><br><dt><samp><span class="option">--non-overlapping-opd</span></samp><dd>Some PowerPC64 compilers have an option to generate compressed
99<code>.opd</code> entries spaced 16 bytes apart, overlapping the third word,
100the static chain pointer (unused in C) with the first word of the next
101entry.  This option expands such entries to the full 24 bytes.
102
103     <p><a name="index-PowerPC64-TOC-optimization-656"></a><a name="index-g_t_002d_002dno_002dtoc_002doptimize-657"></a><br><dt><samp><span class="option">--no-toc-optimize</span></samp><dd>PowerPC64 <samp><span class="command">ld</span></samp> normally removes unused <code>.toc</code> section
104entries.  Such entries are detected by examining relocations that
105reference the TOC in code sections.  A reloc in a deleted code section
106marks a TOC word as unneeded, while a reloc in a kept code section
107marks a TOC word as needed.  Since the TOC may reference itself, TOC
108relocs are also examined.  TOC words marked as both needed and
109unneeded will of course be kept.  TOC words without any referencing
110reloc are assumed to be part of a multi-word entry, and are kept or
111discarded as per the nearest marked preceding word.  This works
112reliably for compiler generated code, but may be incorrect if assembly
113code is used to insert TOC entries.  Use this option to disable the
114optimization.
115
116     <p><a name="index-PowerPC64-multi_002dTOC-658"></a><a name="index-g_t_002d_002dno_002dmulti_002dtoc-659"></a><br><dt><samp><span class="option">--no-multi-toc</span></samp><dd>By default, PowerPC64 GCC generates code for a TOC model where TOC
117entries are accessed with a 16-bit offset from r2.  This limits the
118total TOC size to 64K.  PowerPC64 <samp><span class="command">ld</span></samp> extends this limit by
119grouping code sections such that each group uses less than 64K for its
120TOC entries, then inserts r2 adjusting stubs between inter-group
121calls.  <samp><span class="command">ld</span></samp> does not split apart input sections, so cannot
122help if a single input file has a <code>.toc</code> section that exceeds
12364K, most likely from linking multiple files with <samp><span class="command">ld -r</span></samp>. 
124Use this option to turn off this feature. 
125</dl>
126
127   </body></html>
128
129