1<html lang="en"> 2<head> 3<title>HPPA ELF32 - 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="ARM.html#ARM" title="ARM"> 10<link rel="next" href="M68K.html#M68K" title="M68K"> 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="HPPA-ELF32"></a> 43<p> 44Next: <a rel="next" accesskey="n" href="M68K.html#M68K">M68K</a>, 45Previous: <a rel="previous" accesskey="p" href="ARM.html#ARM">ARM</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.5 <samp><span class="command">ld</span></samp> and HPPA 32-bit ELF Support</h3> 51 52<p><a name="index-HPPA-multiple-sub_002dspace-stubs-620"></a><a name="index-g_t_002d_002dmulti_002dsubspace-621"></a>When generating a shared library, <samp><span class="command">ld</span></samp> will by default generate 53import stubs suitable for use with a single sub-space application. 54The ‘<samp><span class="samp">--multi-subspace</span></samp>’ switch causes <samp><span class="command">ld</span></samp> to generate export 55stubs, and different (larger) import stubs suitable for use with 56multiple sub-spaces. 57 58 <p><a name="index-HPPA-stub-grouping-622"></a><a name="index-g_t_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-623"></a>Long branch stubs and import/export stubs are placed by <samp><span class="command">ld</span></samp> in 59stub sections located between groups of input sections. 60‘<samp><span class="samp">--stub-group-size</span></samp>’ specifies the maximum size of a group of input 61sections handled by one stub section. Since branch offsets are signed, 62a stub section may serve two groups of input sections, one group before 63the stub section, and one group after it. However, when using 64conditional branches that require stubs, it may be better (for branch 65prediction) that stub sections only serve one group of input sections. 66A negative value for ‘<samp><span class="samp">N</span></samp>’ chooses this scheme, ensuring that 67branches to stubs always use a negative offset. Two special values of 68‘<samp><span class="samp">N</span></samp>’ are recognized, ‘<samp><span class="samp">1</span></samp>’ and ‘<samp><span class="samp">-1</span></samp>’. These both instruct 69<samp><span class="command">ld</span></samp> to automatically size input section groups for the branch types 70detected, with the same behaviour regarding stub placement as other 71positive or negative values of ‘<samp><span class="samp">N</span></samp>’ respectively. 72 73 <p>Note that ‘<samp><span class="samp">--stub-group-size</span></samp>’ does not split input sections. A 74single input section larger than the group size specified will of course 75create a larger group (of one section). If input sections are too 76large, it may not be possible for a branch to reach its stub. 77 78 </body></html> 79 80