blob: c593a2f4921b38ab2e340076c4ec2fccb7dfaa42 [file] [log] [blame]
<html lang="en">
<head>
<title>Transformations On Static Variables - STABS</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="STABS">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Transformations-On-Symbol-Tables.html#Transformations-On-Symbol-Tables" title="Transformations On Symbol Tables">
<link rel="next" href="Transformations-On-Global-Variables.html#Transformations-On-Global-Variables" title="Transformations On Global Variables">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1992-2019 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
and David MacKenzie.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Transformations-On-Static-Variables"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Transformations-On-Global-Variables.html#Transformations-On-Global-Variables">Transformations On Global Variables</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Transformations-On-Symbol-Tables.html#Transformations-On-Symbol-Tables">Transformations On Symbol Tables</a>
<hr>
</div>
<h4 class="subsection">7.2.1 Transformations on Static Variables</h4>
<p>This source line defines a static variable at file scope:
<pre class="example"> static int s_g_repeat
</pre>
<p class="noindent">The following stab describes the symbol:
<pre class="example"> .stabs "s_g_repeat:S1",38,0,0,_s_g_repeat
</pre>
<p class="noindent">The assembler transforms the stab into this symbol table entry in the
<samp><span class="file">.o</span></samp> file. The location is expressed as a data segment offset.
<pre class="example"> 00000084 - 00 0000 STSYM s_g_repeat:S1
</pre>
<p class="noindent">In the symbol table entry from the executable, the linker has made the
relocatable address absolute.
<pre class="example"> 0000e00c - 00 0000 STSYM s_g_repeat:S1
</pre>
</body></html>