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 2013.11-24) 15version 2.23.52. 16 17Copyright (C) 1991-2013 Free Software Foundation, Inc. 18 19Permission is granted to copy, distribute and/or modify this document 20under the terms of the GNU Free Documentation License, Version 1.3 21or any later version published by the Free Software Foundation; 22with no Invariant Sections, with no Front-Cover Texts, and with no 23Back-Cover Texts. A copy of the license is included in the 24section entitled ``GNU Free Documentation License''.--> 25<meta http-equiv="Content-Style-Type" content="text/css"> 26<style type="text/css"><!-- 27 pre.display { font-family:inherit } 28 pre.format { font-family:inherit } 29 pre.smalldisplay { font-family:inherit; font-size:smaller } 30 pre.smallformat { font-family:inherit; font-size:smaller } 31 pre.smallexample { font-size:smaller } 32 pre.smalllisp { font-size:smaller } 33 span.sc { font-variant:small-caps } 34 span.roman { font-family:serif; font-weight:normal; } 35 span.sansserif { font-family:sans-serif; font-weight:normal; } 36--></style> 37<link rel="stylesheet" type="text/css" href="../cs.css"> 38</head> 39<body> 40<div class="node"> 41<a name="HPPA-ELF32"></a> 42<p> 43Next: <a rel="next" accesskey="n" href="M68K.html#M68K">M68K</a>, 44Previous: <a rel="previous" accesskey="p" href="ARM.html#ARM">ARM</a>, 45Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a> 46<hr> 47</div> 48 49<h3 class="section">4.5 <samp><span class="command">ld</span></samp> and HPPA 32-bit ELF Support</h3> 50 51<p><a name="index-HPPA-multiple-sub_002dspace-stubs-630"></a><a name="index-g_t_002d_002dmulti_002dsubspace-631"></a>When generating a shared library, <samp><span class="command">ld</span></samp> will by default generate 52import stubs suitable for use with a single sub-space application. 53The ‘<samp><span class="samp">--multi-subspace</span></samp>’ switch causes <samp><span class="command">ld</span></samp> to generate export 54stubs, and different (larger) import stubs suitable for use with 55multiple sub-spaces. 56 57 <p><a name="index-HPPA-stub-grouping-632"></a><a name="index-g_t_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-633"></a>Long branch stubs and import/export stubs are placed by <samp><span class="command">ld</span></samp> in 58stub sections located between groups of input sections. 59‘<samp><span class="samp">--stub-group-size</span></samp>’ specifies the maximum size of a group of input 60sections handled by one stub section. Since branch offsets are signed, 61a stub section may serve two groups of input sections, one group before 62the stub section, and one group after it. However, when using 63conditional branches that require stubs, it may be better (for branch 64prediction) that stub sections only serve one group of input sections. 65A negative value for ‘<samp><span class="samp">N</span></samp>’ chooses this scheme, ensuring that 66branches to stubs always use a negative offset. Two special values of 67‘<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 68<samp><span class="command">ld</span></samp> to automatically size input section groups for the branch types 69detected, with the same behaviour regarding stub placement as other 70positive or negative values of ‘<samp><span class="samp">N</span></samp>’ respectively. 71 72 <p>Note that ‘<samp><span class="samp">--stub-group-size</span></samp>’ does not split input sections. A 73single input section larger than the group size specified will of course 74create a larger group (of one section). If input sections are too 75large, it may not be possible for a branch to reach its stub. 76 77 </body></html> 78 79