dump.hss 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. [Main]
  2. Title=ld-tigcc Program Dumps
  3. [Top]
  4. If you turn on dumps in <CODE>ld-tigcc</CODE> (using the
  5. <B>'--dump[<I>n</I>]'</B> option), <CODE>ld-tigcc</CODE> prints the contents of
  6. the internal data structures to standard output between various events during
  7. the linking stage. These places are numbered, so that you can turn on a specific
  8. dump by adding an index to the option. The following table shows the current
  9. location of the different dumps:
  10. <DL>
  11. <DT><B>Dump 0</B>
  12. <DD>This dump is produced just after all object files have been imported.
  13. Relocation entries that refer to different files have not been resolved yet;
  14. neither have ROM/RAM/library call symbols been translated into actual
  15. ROM/RAM/library calls. Archive members have only been imported if this was
  16. specified by a global import.
  17. <BR><BR>
  18. <DT><B>Dump 1</B>
  19. <DD>Relocation entries have been resolved to the maximum extent possible. If
  20. they could not be resolved to existing symbols or had been treated as
  21. RAM/ROM/library calls, archive members have been imported for them.
  22. <BR><BR>
  23. <DT><B>Dump 2</B>
  24. <DD>All uninitialized and zero-data sections have been merged, as well as all
  25. data sections if this was necessary. Automatic global imports have been
  26. added.
  27. <BR><BR>
  28. <DT><B>Dump 3</B>
  29. <DD>All global imports have been processed; even the ones which contained
  30. negations.
  31. <BR><BR>
  32. <DT><B>Dump 4</B>
  33. <DD>Relocation entries from the archive members which were just
  34. imported by global imports have been resolved, possibly importing new
  35. archive members.
  36. If relocation optimization is enabled, another dump is appended with the
  37. same contents after relocation optimization. If removal of unused
  38. sections is enabled, a third dump is inserted after this removal.
  39. <BR><BR>
  40. <DT><B>Dump 5</B>
  41. <DD>All sections which are not externalized have been merged. Note that some
  42. parts of the code fixup need to be done just before the sections are merged,
  43. so there is also a lot of code fixup and optimization between dumps 4 and 5.
  44. <BR><BR>
  45. <DT><B>Dump 6</B>
  46. <DD>The remaining code fixup and optimization has been performed.
  47. <BR><BR>
  48. <DT><B>Dump 7</B>
  49. <DD>Certain built-in symbols whose value depends on the program contents have
  50. been resolved. Insertions that were requested to be added at an arbitrary
  51. place have been added to the end of the program.
  52. <BR><BR>
  53. <DT><B>Dump 8</B>
  54. <DD>Relative relocation entries have been replaced by the actual distances they
  55. had represented.
  56. </DL>
  57. The program dumps are usually self-explaining; however, a few items require
  58. special attention:
  59. <DL>
  60. <DT><B>&lt;<I>n</I>B: <I>target</I> [- <I>relation</I>] [+/- offset]&gt;</B>
  61. <DD>Indicates a relocation entry or ROM/RAM/library call. <I>target</I> and
  62. <I>relation</I> have the form <I>symbol</I>[+/-<I>offset</I>], which
  63. stands for the address of <I>symbol</I>, corrected by <I>offset</I>.
  64. <I>n</I> specifies the number of bytes reserved for the address/offset of
  65. the target.
  66. <BR><BR>
  67. <DT><B>&lt;<I>n</I>B: ... (rel)&gt;</B>
  68. <DD>Indicates that the relocation entry is relative to its own address.
  69. <BR><BR>
  70. <DT><B>&lt;<I>n</I>B: <I>symbol</I> (?) ...&gt;</B>
  71. <DD>Indicates a relocation entry which has not been resolved yet.
  72. <BR><BR>
  73. <DT><B>&lt;<I>n</I>B: <I>symbol</I> (-&gt;) ...&gt;</B>
  74. <DD>Indicates a relocation entry pointing into another section.
  75. <BR><BR>
  76. <DT><B>&lt;<I>n</I>B: ...&gt; (!)</B>
  77. <DD>Indicates that the section data at the place of the relocation entry is
  78. nonzero. This usually indicates a problem, but in rare cases, it is
  79. valid. For example, if you use ROM/RAM/library calls with an offset, this
  80. offset is usually emitted into the section contents, but the actual call
  81. still exists.
  82. <BR><BR>
  83. <DT><B><I>address</I>: (!)</B>
  84. <DD>Indicates an internal inconsistency (for example an item outside of a
  85. section, overlapping items, or an internal ordering error).
  86. </DL>
  87. Section offsets and data are always output in hexadecimal notation. Question
  88. marks indicate uninitialized data, which may have random content.