Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / stabs / Stab-Section-Transformations.html
blob99136ea1c059cb8cc0b329e29aa7fbf6c68b68c7
1 <html lang="en">
2 <head>
3 <title>STABS</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="STABS">
6 <meta name="generator" content="makeinfo 4.3">
7 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Stab%20Section%20Transformations">Stab Section Transformations</a>,
13 Previous:<a rel="previous" accesskey="p" href="Transformations-On-Global-Variables.html#Transformations%20On%20Global%20Variables">Transformations On Global Variables</a>,
14 Up:<a rel="up" accesskey="u" href="Transformations-On-Symbol-Tables.html#Transformations%20On%20Symbol%20Tables">Transformations On Symbol Tables</a>
15 <hr><br>
16 </div>
18 <h4 class="subsection">Transformations of Stabs in separate sections</h4>
20 <p>For object file formats using stabs in separate sections (see <a href="Stab-Sections.html#Stab%20Sections">Stab Sections</a>), use <code>objdump --stabs</code> instead of <code>nm</code> to show the
21 stabs in an object or executable file. <code>objdump</code> is a GNU utility;
22 Sun does not provide any equivalent.
24 <p>The following example is for a stab whose value is an address is
25 relative to the compilation unit (see <a href="ELF-Linker-Relocation.html#ELF%20Linker%20Relocation">ELF Linker Relocation</a>). For
26 example, if the source line
28 <pre class="example"> static int ld = 5;
29 </pre>
31 <p>appears within a function, then the assembly language output from the
32 compiler contains:
34 <pre class="example"> .Ddata.data:
35 ...
36 .stabs "ld:V(0,3)",0x26,0,4,.L18-Ddata.data # 0x26 is N_STSYM
37 ...
38 .L18:
39 .align 4
40 .word 0x5
41 </pre>
43 <p>Because the value is formed by subtracting one symbol from another, the
44 value is absolute, not relocatable, and so the object file contains
46 <pre class="example"> Symnum n_type n_othr n_desc n_value n_strx String
47 31 STSYM 0 4 00000004 680 ld:V(0,3)
48 </pre>
50 <p>without any relocations, and the executable file also contains
52 <pre class="example"> Symnum n_type n_othr n_desc n_value n_strx String
53 31 STSYM 0 4 00000004 680 ld:V(0,3)
54 </pre>
56 </body></html>