HPPA-ELF32.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 Binutils)
  5. version 2.28.
  6. Copyright (C) 1991-2017 Free Software Foundation, Inc.
  7. Permission is granted to copy, distribute and/or modify this document
  8. under the terms of the GNU Free Documentation License, Version 1.3
  9. or any later version published by the Free Software Foundation;
  10. with no Invariant Sections, with no Front-Cover Texts, and with no
  11. Back-Cover Texts. A copy of the license is included in the
  12. section entitled "GNU Free Documentation License". -->
  13. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <title>LD: HPPA ELF32</title>
  16. <meta name="description" content="LD: HPPA ELF32">
  17. <meta name="keywords" content="LD: HPPA ELF32">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="LD-Index.html#LD-Index" rel="index" title="LD Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="Machine-Dependent.html#Machine-Dependent" rel="up" title="Machine Dependent">
  26. <link href="M68K.html#M68K" rel="next" title="M68K">
  27. <link href="ARM.html#ARM" rel="prev" title="ARM">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.indentedblock {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style:oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nocodebreak {white-space:nowrap}
  50. span.nolinebreak {white-space:nowrap}
  51. span.roman {font-family:serif; font-weight:normal}
  52. span.sansserif {font-family:sans-serif; font-weight:normal}
  53. ul.no-bullet {list-style: none}
  54. -->
  55. </style>
  56. </head>
  57. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  58. <a name="HPPA-ELF32"></a>
  59. <div class="header">
  60. <p>
  61. Next: <a href="M68K.html#M68K" accesskey="n" rel="next">M68K</a>, Previous: <a href="ARM.html#ARM" accesskey="p" rel="prev">ARM</a>, Up: <a href="Machine-Dependent.html#Machine-Dependent" accesskey="u" rel="up">Machine Dependent</a> &nbsp; [<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>
  62. </div>
  63. <hr>
  64. <a name="ld-and-HPPA-32_002dbit-ELF-Support"></a>
  65. <h3 class="section">4.5 <code>ld</code> and HPPA 32-bit ELF Support</h3>
  66. <a name="index-HPPA-multiple-sub_002dspace-stubs"></a>
  67. <a name="index-_002d_002dmulti_002dsubspace"></a>
  68. <p>When generating a shared library, <code>ld</code> will by default generate
  69. import stubs suitable for use with a single sub-space application.
  70. The &lsquo;<samp>--multi-subspace</samp>&rsquo; switch causes <code>ld</code> to generate export
  71. stubs, and different (larger) import stubs suitable for use with
  72. multiple sub-spaces.
  73. </p>
  74. <a name="index-HPPA-stub-grouping"></a>
  75. <a name="index-_002d_002dstub_002dgroup_002dsize_003dN-1"></a>
  76. <p>Long branch stubs and import/export stubs are placed by <code>ld</code> in
  77. stub sections located between groups of input sections.
  78. &lsquo;<samp>--stub-group-size</samp>&rsquo; specifies the maximum size of a group of input
  79. sections handled by one stub section. Since branch offsets are signed,
  80. a stub section may serve two groups of input sections, one group before
  81. the stub section, and one group after it. However, when using
  82. conditional branches that require stubs, it may be better (for branch
  83. prediction) that stub sections only serve one group of input sections.
  84. A negative value for &lsquo;<samp>N</samp>&rsquo; chooses this scheme, ensuring that
  85. branches to stubs always use a negative offset. Two special values of
  86. &lsquo;<samp>N</samp>&rsquo; are recognized, &lsquo;<samp>1</samp>&rsquo; and &lsquo;<samp>-1</samp>&rsquo;. These both instruct
  87. <code>ld</code> to automatically size input section groups for the branch types
  88. detected, with the same behaviour regarding stub placement as other
  89. positive or negative values of &lsquo;<samp>N</samp>&rsquo; respectively.
  90. </p>
  91. <p>Note that &lsquo;<samp>--stub-group-size</samp>&rsquo; does not split input sections. A
  92. single input section larger than the group size specified will of course
  93. create a larger group (of one section). If input sections are too
  94. large, it may not be possible for a branch to reach its stub.
  95. </p>
  96. </body>
  97. </html>