You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

232 lines
11KB

  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 Arm Embedded Toolchain 10-2020-q4-major)
  5. version 2.35.1.
  6. Copyright (C) 1991-2020 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 6.5, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  16. <title>Bug Reporting (LD)</title>
  17. <meta name="description" content="Bug Reporting (LD)">
  18. <meta name="keywords" content="Bug Reporting (LD)">
  19. <meta name="resource-type" content="document">
  20. <meta name="distribution" content="global">
  21. <meta name="Generator" content="makeinfo">
  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="Reporting-Bugs.html#Reporting-Bugs" rel="up" title="Reporting Bugs">
  26. <link href="MRI.html#MRI" rel="next" title="MRI">
  27. <link href="Bug-Criteria.html#Bug-Criteria" rel="prev" title="Bug Criteria">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.indentedblock {margin-right: 0em}
  32. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  33. blockquote.smallquotation {font-size: smaller}
  34. div.display {margin-left: 3.2em}
  35. div.example {margin-left: 3.2em}
  36. div.lisp {margin-left: 3.2em}
  37. div.smalldisplay {margin-left: 3.2em}
  38. div.smallexample {margin-left: 3.2em}
  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.nolinebreak {white-space: nowrap}
  50. span.roman {font-family: initial; font-weight: normal}
  51. span.sansserif {font-family: sans-serif; font-weight: normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en">
  57. <a name="Bug-Reporting"></a>
  58. <div class="header">
  59. <p>
  60. Previous: <a href="Bug-Criteria.html#Bug-Criteria" accesskey="p" rel="prev">Bug Criteria</a>, Up: <a href="Reporting-Bugs.html#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</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>
  61. </div>
  62. <hr>
  63. <a name="How-to-Report-Bugs"></a>
  64. <h3 class="section">6.2 How to Report Bugs</h3>
  65. <a name="index-bug-reports"></a>
  66. <a name="index-ld-bugs_002c-reporting"></a>
  67. <p>A number of companies and individuals offer support for <small>GNU</small>
  68. products. If you obtained <code>ld</code> from a support organization, we
  69. recommend you contact that organization first.
  70. </p>
  71. <p>You can find contact information for many support companies and
  72. individuals in the file <samp>etc/SERVICE</samp> in the <small>GNU</small> Emacs
  73. distribution.
  74. </p>
  75. <p>Otherwise, send bug reports for <code>ld</code> to
  76. <a href="http://www.sourceware.org/bugzilla/">http://www.sourceware.org/bugzilla/</a>.
  77. </p>
  78. <p>The fundamental principle of reporting bugs usefully is this:
  79. <strong>report all the facts</strong>. If you are not sure whether to state a
  80. fact or leave it out, state it!
  81. </p>
  82. <p>Often people omit facts because they think they know what causes the
  83. problem and assume that some details do not matter. Thus, you might
  84. assume that the name of a symbol you use in an example does not
  85. matter. Well, probably it does not, but one cannot be sure. Perhaps
  86. the bug is a stray memory reference which happens to fetch from the
  87. location where that name is stored in memory; perhaps, if the name
  88. were different, the contents of that location would fool the linker
  89. into doing the right thing despite the bug. Play it safe and give a
  90. specific, complete example. That is the easiest thing for you to do,
  91. and the most helpful.
  92. </p>
  93. <p>Keep in mind that the purpose of a bug report is to enable us to fix
  94. the bug if it is new to us. Therefore, always write your bug reports
  95. on the assumption that the bug has not been reported previously.
  96. </p>
  97. <p>Sometimes people give a few sketchy facts and ask, &ldquo;Does this ring a
  98. bell?&rdquo; This cannot help us fix a bug, so it is basically useless. We
  99. respond by asking for enough details to enable us to investigate.
  100. You might as well expedite matters by sending them to begin with.
  101. </p>
  102. <p>To enable us to fix the bug, you should include all these things:
  103. </p>
  104. <ul>
  105. <li> The version of <code>ld</code>. <code>ld</code> announces it if you start it with
  106. the &lsquo;<samp>--version</samp>&rsquo; argument.
  107. <p>Without this, we will not know whether there is any point in looking for
  108. the bug in the current version of <code>ld</code>.
  109. </p>
  110. </li><li> Any patches you may have applied to the <code>ld</code> source, including any
  111. patches made to the <code>BFD</code> library.
  112. </li><li> The type of machine you are using, and the operating system name and
  113. version number.
  114. </li><li> What compiler (and its version) was used to compile <code>ld</code>&mdash;e.g.
  115. &ldquo;<code>gcc-2.7</code>&rdquo;.
  116. </li><li> The command arguments you gave the linker to link your example and
  117. observe the bug. To guarantee you will not omit something important,
  118. list them all. A copy of the Makefile (or the output from make) is
  119. sufficient.
  120. <p>If we were to try to guess the arguments, we would probably guess wrong
  121. and then we might not encounter the bug.
  122. </p>
  123. </li><li> A complete input file, or set of input files, that will reproduce the
  124. bug. It is generally most helpful to send the actual object files
  125. provided that they are reasonably small. Say no more than 10K. For
  126. bigger files you can either make them available by FTP or HTTP or else
  127. state that you are willing to send the object file(s) to whomever
  128. requests them. (Note - your email will be going to a mailing list, so
  129. we do not want to clog it up with large attachments). But small
  130. attachments are best.
  131. <p>If the source files were assembled using <code>gas</code> or compiled using
  132. <code>gcc</code>, then it may be OK to send the source files rather than the
  133. object files. In this case, be sure to say exactly what version of
  134. <code>gas</code> or <code>gcc</code> was used to produce the object files. Also say
  135. how <code>gas</code> or <code>gcc</code> were configured.
  136. </p>
  137. </li><li> A description of what behavior you observe that you believe is
  138. incorrect. For example, &ldquo;It gets a fatal signal.&rdquo;
  139. <p>Of course, if the bug is that <code>ld</code> gets a fatal signal, then we
  140. will certainly notice it. But if the bug is incorrect output, we might
  141. not notice unless it is glaringly wrong. You might as well not give us
  142. a chance to make a mistake.
  143. </p>
  144. <p>Even if the problem you experience is a fatal signal, you should still
  145. say so explicitly. Suppose something strange is going on, such as, your
  146. copy of <code>ld</code> is out of sync, or you have encountered a bug in the
  147. C library on your system. (This has happened!) Your copy might crash
  148. and ours would not. If you told us to expect a crash, then when ours
  149. fails to crash, we would know that the bug was not happening for us. If
  150. you had not told us to expect a crash, then we would not be able to draw
  151. any conclusion from our observations.
  152. </p>
  153. </li><li> If you wish to suggest changes to the <code>ld</code> source, send us context
  154. diffs, as generated by <code>diff</code> with the &lsquo;<samp>-u</samp>&rsquo;, &lsquo;<samp>-c</samp>&rsquo;, or
  155. &lsquo;<samp>-p</samp>&rsquo; option. Always send diffs from the old file to the new file.
  156. If you even discuss something in the <code>ld</code> source, refer to it by
  157. context, not by line number.
  158. <p>The line numbers in our development sources will not match those in your
  159. sources. Your line numbers would convey no useful information to us.
  160. </p></li></ul>
  161. <p>Here are some things that are not necessary:
  162. </p>
  163. <ul>
  164. <li> A description of the envelope of the bug.
  165. <p>Often people who encounter a bug spend a lot of time investigating
  166. which changes to the input file will make the bug go away and which
  167. changes will not affect it.
  168. </p>
  169. <p>This is often time consuming and not very useful, because the way we
  170. will find the bug is by running a single example under the debugger
  171. with breakpoints, not by pure deduction from a series of examples.
  172. We recommend that you save your time for something else.
  173. </p>
  174. <p>Of course, if you can find a simpler example to report <em>instead</em>
  175. of the original one, that is a convenience for us. Errors in the
  176. output will be easier to spot, running under the debugger will take
  177. less time, and so on.
  178. </p>
  179. <p>However, simplification is not vital; if you do not want to do this,
  180. report the bug anyway and send us the entire test case you used.
  181. </p>
  182. </li><li> A patch for the bug.
  183. <p>A patch for the bug does help us if it is a good one. But do not omit
  184. the necessary information, such as the test case, on the assumption that
  185. a patch is all we need. We might see problems with your patch and decide
  186. to fix the problem another way, or we might not understand it at all.
  187. </p>
  188. <p>Sometimes with a program as complicated as <code>ld</code> it is very hard to
  189. construct an example that will make the program follow a certain path
  190. through the code. If you do not send us the example, we will not be
  191. able to construct one, so we will not be able to verify that the bug is
  192. fixed.
  193. </p>
  194. <p>And if we cannot understand what bug you are trying to fix, or why your
  195. patch should be an improvement, we will not install it. A test case will
  196. help us to understand.
  197. </p>
  198. </li><li> A guess about what the bug is or what it depends on.
  199. <p>Such guesses are usually wrong. Even we cannot guess right about such
  200. things without first using the debugger to find the facts.
  201. </p></li></ul>
  202. <hr>
  203. <div class="header">
  204. <p>
  205. Previous: <a href="Bug-Criteria.html#Bug-Criteria" accesskey="p" rel="prev">Bug Criteria</a>, Up: <a href="Reporting-Bugs.html#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</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>
  206. </div>
  207. </body>
  208. </html>