hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This file documents the BFD library.
 
Copyright (C) 1991-2016 Free Software Foundation, Inc.
 
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 the
Invariant Sections being "GNU General Public License" and "Funding
Free Software", the Front-Cover texts being (a) (see below), and with
the Back-Cover Texts being (b) (see below).  A copy of the license is
included in the section entitled "GNU Free Documentation License".
 
(a) The FSF's Front-Cover Text is:
 
A GNU Manual
 
(b) The FSF's Back-Cover Text is:
 
You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Untitled Document: typedef asymbol</title>
 
<meta name="description" content="Untitled Document: typedef asymbol">
<meta name="keywords" content="Untitled Document: typedef asymbol">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="BFD-Index.html#BFD-Index" rel="index" title="BFD Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Symbols.html#Symbols" rel="up" title="Symbols">
<link href="symbol-handling-functions.html#symbol-handling-functions" rel="next" title="symbol handling functions">
<link href="Mini-Symbols.html#Mini-Symbols" rel="prev" title="Mini Symbols">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
 
 
</head>
 
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="typedef-asymbol"></a>
<div class="header">
<p>
Next: <a href="symbol-handling-functions.html#symbol-handling-functions" accesskey="n" rel="next">symbol handling functions</a>, Previous: <a href="Mini-Symbols.html#Mini-Symbols" accesskey="p" rel="prev">Mini Symbols</a>, Up: <a href="Symbols.html#Symbols" accesskey="u" rel="up">Symbols</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="BFD-Index.html#BFD-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="typedef-asymbol-1"></a>
<h4 class="subsection">2.7.4 typedef asymbol</h4>
<p>An <code>asymbol</code> has the form:
</p>
 
<div class="example">
<pre class="example">
typedef struct bfd_symbol
{
  /* A pointer to the BFD which owns the symbol. This information
     is necessary so that a back end can work out what additional
     information (invisible to the application writer) is carried
     with the symbol.
 
     This field is *almost* redundant, since you can use section-&gt;owner
     instead, except that some symbols point to the global sections
     bfd_{abs,com,und}_section.  This could be fixed by making
     these globals be per-bfd (or per-target-flavor).  FIXME.  */
  struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field.  */
 
  /* The text of the symbol. The name is left alone, and not copied; the
     application may not alter it.  */
  const char *name;
 
  /* The value of the symbol.  This really should be a union of a
     numeric value with a pointer, since some flags indicate that
     a pointer to another symbol is stored here.  */
  symvalue value;
 
  /* Attributes of a symbol.  */
#define BSF_NO_FLAGS           0x00
 
  /* The symbol has local scope; <code>static</code> in <code>C</code>. The value
     is the offset into the section of the data.  */
#define BSF_LOCAL              (1 &lt;&lt; 0)
 
  /* The symbol has global scope; initialized data in <code>C</code>. The
     value is the offset into the section of the data.  */
#define BSF_GLOBAL             (1 &lt;&lt; 1)
 
  /* The symbol has global scope and is exported. The value is
     the offset into the section of the data.  */
#define BSF_EXPORT     BSF_GLOBAL /* No real difference.  */
 
  /* A normal C symbol would be one of:
     <code>BSF_LOCAL</code>, <code>BSF_UNDEFINED</code> or <code>BSF_GLOBAL</code>.  */
 
  /* The symbol is a debugging record. The value has an arbitrary
     meaning, unless BSF_DEBUGGING_RELOC is also set.  */
#define BSF_DEBUGGING          (1 &lt;&lt; 2)
 
  /* The symbol denotes a function entry point.  Used in ELF,
     perhaps others someday.  */
#define BSF_FUNCTION           (1 &lt;&lt; 3)
 
  /* Used by the linker.  */
#define BSF_KEEP               (1 &lt;&lt; 5)
 
  /* An ELF common symbol.  */
#define BSF_ELF_COMMON         (1 &lt;&lt; 6)
 
  /* A weak global symbol, overridable without warnings by
     a regular global symbol of the same name.  */
#define BSF_WEAK               (1 &lt;&lt; 7)
 
  /* This symbol was created to point to a section, e.g. ELF's
     STT_SECTION symbols.  */
#define BSF_SECTION_SYM        (1 &lt;&lt; 8)
 
  /* The symbol used to be a common symbol, but now it is
     allocated.  */
#define BSF_OLD_COMMON         (1 &lt;&lt; 9)
 
  /* In some files the type of a symbol sometimes alters its
     location in an output file - ie in coff a <code>ISFCN</code> symbol
     which is also <code>C_EXT</code> symbol appears where it was
     declared and not at the end of a section.  This bit is set
     by the target BFD part to convey this information.  */
#define BSF_NOT_AT_END         (1 &lt;&lt; 10)
 
  /* Signal that the symbol is the label of constructor section.  */
#define BSF_CONSTRUCTOR        (1 &lt;&lt; 11)
 
  /* Signal that the symbol is a warning symbol.  The name is a
     warning.  The name of the next symbol is the one to warn about;
     if a reference is made to a symbol with the same name as the next
     symbol, a warning is issued by the linker.  */
#define BSF_WARNING            (1 &lt;&lt; 12)
 
  /* Signal that the symbol is indirect.  This symbol is an indirect
     pointer to the symbol with the same name as the next symbol.  */
#define BSF_INDIRECT           (1 &lt;&lt; 13)
 
  /* BSF_FILE marks symbols that contain a file name.  This is used
     for ELF STT_FILE symbols.  */
#define BSF_FILE               (1 &lt;&lt; 14)
 
  /* Symbol is from dynamic linking information.  */
#define BSF_DYNAMIC            (1 &lt;&lt; 15)
 
  /* The symbol denotes a data object.  Used in ELF, and perhaps
     others someday.  */
#define BSF_OBJECT             (1 &lt;&lt; 16)
 
  /* This symbol is a debugging symbol.  The value is the offset
     into the section of the data.  BSF_DEBUGGING should be set
     as well.  */
#define BSF_DEBUGGING_RELOC    (1 &lt;&lt; 17)
 
  /* This symbol is thread local.  Used in ELF.  */
#define BSF_THREAD_LOCAL       (1 &lt;&lt; 18)
 
  /* This symbol represents a complex relocation expression,
     with the expression tree serialized in the symbol name.  */
#define BSF_RELC               (1 &lt;&lt; 19)
 
  /* This symbol represents a signed complex relocation expression,
     with the expression tree serialized in the symbol name.  */
#define BSF_SRELC              (1 &lt;&lt; 20)
 
  /* This symbol was created by bfd_get_synthetic_symtab.  */
#define BSF_SYNTHETIC          (1 &lt;&lt; 21)
 
  /* This symbol is an indirect code object.  Unrelated to BSF_INDIRECT.
     The dynamic linker will compute the value of this symbol by
     calling the function that it points to.  BSF_FUNCTION must
     also be also set.  */
#define BSF_GNU_INDIRECT_FUNCTION (1 &lt;&lt; 22)
  /* This symbol is a globally unique data object.  The dynamic linker
     will make sure that in the entire process there is just one symbol
     with this name and type in use.  BSF_OBJECT must also be set.  */
#define BSF_GNU_UNIQUE         (1 &lt;&lt; 23)
 
  flagword flags;
 
  /* A pointer to the section to which this symbol is
     relative.  This will always be non NULL, there are special
     sections for undefined and absolute symbols.  */
  struct bfd_section *section;
 
  /* Back end special data.  */
  union
    {
      void *p;
      bfd_vma i;
    }
  udata;
}
asymbol;
 
</pre></div>
 
<hr>
<div class="header">
<p>
Next: <a href="symbol-handling-functions.html#symbol-handling-functions" accesskey="n" rel="next">symbol handling functions</a>, Previous: <a href="Mini-Symbols.html#Mini-Symbols" accesskey="p" rel="prev">Mini Symbols</a>, Up: <a href="Symbols.html#Symbols" accesskey="u" rel="up">Symbols</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="BFD-Index.html#BFD-Index" title="Index" rel="index">Index</a>]</p>
</div>
 
 
 
</body>
</html>