ruby-elf 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,290 +0,0 @@
1
- <?xml version='1.0'?>
2
- <!--
3
- Copyright © 2008-2011, Diego Elio Pettenò <flameeyes@flameeyes.eu>
4
-
5
- This program is free software; you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License as published by
7
- the Free Software Foundation; either version 2 of the License, or
8
- (at your option) any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
14
-
15
- You should have received a copy of the GNU General Public License
16
- along with this generator; if not, write to the Free Software
17
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
- -->
19
- <article xmlns="http://docbook.org/ns/docbook"
20
- xmlns:xl="http://www.w3.org/1999/xlink"
21
- xmlns:xi="http://www.w3.org/2001/XInclude"
22
- version="5.0" xml:lang="en">
23
- <info>
24
- <title>missingstatic</title>
25
-
26
- <xi:include parse="xml" href="author.xmli" />
27
- </info>
28
-
29
- <section>
30
- <title>Reference</title>
31
-
32
- <refentry>
33
- <info>
34
- <date>October 2008</date>
35
- <productname>ruby-elf</productname>
36
- </info>
37
- <refmeta>
38
- <refentrytitle>missingstatic</refentrytitle>
39
- <manvolnum>1</manvolnum>
40
- </refmeta>
41
- <refnamediv>
42
- <refname>missingstatic</refname>
43
- <refpurpose>ELF analyzer to identify missing static modifiers</refpurpose>
44
- </refnamediv>
45
- <refsynopsisdiv>
46
- <cmdsynopsis>
47
- <command>missingstatic</command>
48
- <arg choice="opt"><option>--hidden-only</option></arg>
49
- <arg choice="opt"><option>--show-type</option></arg>
50
- <arg choice="opt">
51
- <option>--exclude-regexp</option>
52
- <replaceable>regular-expression</replaceable>
53
- </arg>
54
- <arg choice="opt">
55
- <option>--exclude-tags</option>
56
- <replaceable>tags-file</replaceable>
57
- </arg>
58
-
59
- <xi:include href="common.xmli" xpointer="xpointer(id('filelist.synopsis')/*)" />
60
- </cmdsynopsis>
61
- </refsynopsisdiv>
62
-
63
- <refsect1>
64
- <title>Description</title>
65
- <para>
66
- <command>missingstatic</command> is a script that analyses ELF object files to identify
67
- symbols that are unused outside their compilation unit. Those symbols are usually
68
- candidate for the <constant>static</constant> modifier, to make the symbol local to the
69
- unit.
70
- </para>
71
-
72
- <para>
73
- In addition to symbols that are used only internally to an unit, this script will most
74
- likely report the almost entire set of externally-visible API in the case of
75
- libraries. For this reason, options are provided to reduce the scope of action.
76
- </para>
77
- </refsect1>
78
-
79
- <refsect1>
80
- <title>Options</title>
81
-
82
- <variablelist>
83
- <varlistentry>
84
- <term><option>-h</option></term>
85
- <term><option>--hidden-only</option></term>
86
- <listitem>
87
- <para>
88
- Only show symbols that have hidden visibility. Hidden symbols are not visible from
89
- outside the module, and thus will ignore the external visible symbols that compose
90
- the externally-visible API. This option is only useful for libraries that make
91
- proper use of visibility attributes.
92
- </para>
93
- </listitem>
94
- </varlistentry>
95
-
96
- <varlistentry>
97
- <term><option>-t</option></term>
98
- <term><option>--show-type</option></term>
99
- <listitem>
100
- <para>
101
- Show the type of the symbol. The symbols reported by the script might be functions,
102
- variables, or constants. By default, only the name of the symbol, with this option,
103
- a letter in front of the symbol will tell you the type of it; the letters are the
104
- same as used by GNU
105
- <citerefentry><refentrytitle>nm</refentrytitle><manvolnum>1</manvolnum></citerefentry>:
106
-
107
- <variablelist>
108
- <varlistentry>
109
- <term>T</term>
110
- <listitem>
111
- <para>
112
- The symbol is in the text (code) section, and is thus a function
113
- </para>
114
- </listitem>
115
- </varlistentry>
116
-
117
- <varlistentry>
118
- <term>B</term>
119
- <listitem>
120
- <para>
121
- The symbol is in the uninitialised data section (known as BSS), and is thus
122
- a variable.
123
- </para>
124
- </listitem>
125
- </varlistentry>
126
-
127
- <varlistentry>
128
- <term>D</term>
129
- <listitem>
130
- <para>
131
- The symbol is in the initialised data section, and is thus a variable.
132
- </para>
133
- </listitem>
134
- </varlistentry>
135
-
136
- <varlistentry>
137
- <term>R</term>
138
- <listitem>
139
- <para>
140
- The symbol is in the read only data section, and is thus a constant.
141
- </para>
142
- </listitem>
143
- </varlistentry>
144
-
145
- </variablelist>
146
-
147
- </para>
148
- </listitem>
149
- </varlistentry>
150
-
151
- <varlistentry>
152
- <term>
153
- <option>-x</option>
154
- <replaceable>regular-expression</replaceable>
155
- </term>
156
- <term>
157
- <option>--exclude-regexp</option>
158
- <replaceable>regular-expression</replaceable>
159
- </term>
160
- <listitem>
161
- <para>
162
- Ignore symbols whose name triggers the given regular expression. This option is
163
- useful to hide all the symbols of the public API of a library if they all have the
164
- same prefix. It can be used multiple times.
165
- </para>
166
- </listitem>
167
- </varlistentry>
168
-
169
- <varlistentry>
170
- <term>
171
- <option>-X</option>
172
- <replaceable>tags-file</replaceable>
173
- </term>
174
- <term>
175
- <option>--exclude-tags</option>
176
- <replaceable>tags-file</replaceable>
177
- </term>
178
- <listitem>
179
- <para>
180
- Ignore symbols present in a tags file created by
181
- <command>exuberant-ctags</command>. This option is useful to hide all the symbols in
182
- the public header files of a project, by creating a list of public-visible
183
- symbols. See the <link linkend="examples">EXAMPLES</link> section for how to
184
- generate such a tags file. It can be used multiple times.
185
- </para>
186
-
187
- </listitem>
188
- </varlistentry>
189
-
190
- <xi:include href="common.xmli" xpointer="xpointer(id('filelist.option')/*)" />
191
-
192
- </variablelist>
193
- </refsect1>
194
-
195
- <refsect1 xml:id="examples">
196
- <title>Examples</title>
197
-
198
- <refsect2>
199
- <title>Generating the tags file</title>
200
-
201
- <para>
202
- To generate a tags file compatible with the <option>--exclude-tags</option> command-line
203
- option, you can use
204
- <citerefentry>
205
- <refentrytitle>exuberant-ctags</refentrytitle>
206
- <manvolnum>1</manvolnum>
207
- </citerefentry>
208
- with a command similar to the following:
209
- </para>
210
-
211
- <example>
212
- <title>
213
- Generate a tags file for public header files
214
- </title>
215
-
216
- <programlisting>
217
- exuberant-ctags --c-kinds=px -f public-symbols include/public/*.h
218
- </programlisting>
219
- </example>
220
- </refsect2>
221
-
222
- <refsect2>
223
- <title>Sorting <command>missingstatic</command> output</title>
224
-
225
- <para>
226
- Since sorting by translation unit is non-trivial inside the script, piping through
227
- <citerefentry>
228
- <refentrytitle>sort</refentrytitle>
229
- <manvolnum>1</manvolnum>
230
- </citerefentry>
231
- is suggested. Using the <option>-k</option> option it's possible to sort for the desired
232
- key, may it be the symbol name, the translation unit name or the symbol type.
233
- </para>
234
-
235
- <example>
236
- <title>Sorting <command>missingstatic</command> output for translation unit name
237
- </title>
238
-
239
- <programlisting>
240
- find . -name '*.o' | missingstatic -h | sort -k2
241
- </programlisting>
242
- </example>
243
- </refsect2>
244
- </refsect1>
245
-
246
- <refsect1>
247
- <title>Bugs and Missing Features</title>
248
- <para>
249
- <command>missingstatic</command> assumes that all the sources for a module and just that
250
- module will be passed to it, if more or less sources will be passed to the command, the
251
- results might not be the expected ones.
252
- </para>
253
-
254
- <xi:include href="common.xmli" xpointer="xpointer(id('filelist.bugpara')/*)" />
255
- </refsect1>
256
-
257
- <refsect1>
258
- <title>See Also</title>
259
- <para>
260
- <citation xl:href="http://blog.flameeyes.eu/">Flameeyes's Weblog</citation>
261
- http://blog.flameeyes.eu/
262
- </para>
263
-
264
- <para>
265
- Related tools:
266
-
267
- <citerefentry>
268
- <refentrytitle>nm</refentrytitle>
269
- <manvolnum>1</manvolnum>
270
- </citerefentry>,
271
-
272
- <citerefentry>
273
- <refentrytitle>exuberant-ctags</refentrytitle>
274
- <manvolnum>1</manvolnum>
275
- </citerefentry>.
276
- </para>
277
- </refsect1>
278
- </refentry>
279
- </section>
280
- </article>
281
- <!--
282
- Local Variables:
283
- mode: nxml
284
- mode: auto-fill
285
- mode: flyspell
286
- ispell-local-dictionary: "english"
287
- fill-column: 100
288
- indent-tabs-mode: nil
289
- End:
290
- -->
@@ -1,339 +0,0 @@
1
- <?xml version='1.0'?>
2
- <!--
3
- Copyright © 2011, Diego Elio Pettenò <flameeyes@flameeyes.eu>
4
-
5
- This program is free software; you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License as published by
7
- the Free Software Foundation; either version 2 of the License, or
8
- (at your option) any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
14
-
15
- You should have received a copy of the GNU General Public License
16
- along with this generator; if not, write to the Free Software
17
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
- -->
19
- <article xmlns="http://docbook.org/ns/docbook"
20
- xmlns:xl="http://www.w3.org/1999/xlink"
21
- xmlns:xi="http://www.w3.org/2001/XInclude"
22
- version="5.0" xml:lang="en">
23
- <info>
24
- <title>rbelf-nm</title>
25
-
26
- <xi:include parse="xml" href="author.xmli" />
27
- </info>
28
-
29
- <section>
30
- <title>Reference</title>
31
-
32
- <refentry>
33
- <info>
34
- <date>August 2011</date>
35
- <productname>ruby-elf</productname>
36
- </info>
37
- <refmeta>
38
- <refentrytitle>rbelf-size</refentrytitle>
39
- <manvolnum>1</manvolnum>
40
- </refmeta>
41
- <refnamediv>
42
- <refname>rbelf-nm</refname>
43
- <refpurpose>List symbols from ELF files</refpurpose>
44
- </refnamediv>
45
- <refsynopsisdiv>
46
- <cmdsynopsis>
47
- <command>rbelf-nm</command>
48
-
49
- <arg choice="opt">
50
- <option>--dynamic</option>
51
- </arg>
52
-
53
- <arg choice="opt">
54
- <option>--demangle</option>
55
- </arg>
56
-
57
- <arg choice="opt">
58
- <option>--sort-by</option>
59
- <group rep="norepeat" choice="req">
60
- <arg choice="plain">name</arg>
61
- <arg choice="plain">option</arg>
62
- <arg choice="plain">none</arg>
63
- </group>
64
- </arg>
65
-
66
- <xi:include href="common.xmli" xpointer="xpointer(id('filelist.synopsis')/*)" />
67
- </cmdsynopsis>
68
- </refsynopsisdiv>
69
-
70
- <refsect1>
71
- <title>Description</title>
72
- <para>
73
- <command>rbelf-nm</command> is a replacement for the standard
74
- <citerefentry><refentrytitle>nm</refentrytitle><manvolnum>1</manvolnum></citerefentry>
75
- utility, as provided by GNU binutils and similar suites.
76
- </para>
77
- </refsect1>
78
-
79
- <refsect1>
80
- <title>Options</title>
81
-
82
- <variablelist>
83
- <varlistentry>
84
- <term><option>-D</option></term>
85
- <term><option>--dynamic</option></term>
86
- <listitem>
87
- <para>
88
- Display symbols in the dynamic symbol table, not the normal symbol table. This is
89
- useful to identify the symbols exported by a shared object.
90
- </para>
91
- </listitem>
92
- </varlistentry>
93
-
94
- <varlistentry>
95
- <term><option>-C</option></term>
96
- <term><option>--demangle</option></term>
97
- <listitem>
98
- <para>
99
- Demangle encoded symbol names. Certain languages (C++) and interfaces (Java's JNI)
100
- transform their native symbol names into Unix-compatible names to store in the
101
- symbol tables, this option applies the opposite transformation to identify the
102
- original symbols.
103
- </para>
104
- </listitem>
105
- </varlistentry>
106
-
107
- <varlistentry>
108
- <term><option>-S</option> { <option>name</option> | <option>address</option> |
109
- <option>none</option> }</term>
110
- <term><option>--sort-by</option> { <option>name</option> | <option>address</option> |
111
- <option>none</option> }</term>
112
- <listitem>
113
- <para>
114
- Choose how to sort the output: by symbol name (the default), by symbol address, or
115
- in the order of appearance in the symbol tables (which involves no sorting, and is
116
- faster).
117
- </para>
118
- </listitem>
119
- </varlistentry>
120
-
121
- <varlistentry>
122
- <term><option>-V</option></term>
123
- <term><option>--show-version</option></term>
124
- <listitem>
125
- <para>
126
- Show the symbol version information in output. Version information for symbols is an
127
- extension, and is implemented with different interfaces by Sun and GNU (for Linux).
128
- </para>
129
-
130
- <para>
131
- Symbols exported with default version (the one selected for linking) are marked with
132
- a <literal>@@</literal> separator, the rest are marked with a simple
133
- <literal>@</literal>, while symbols without version information have no mark at all.
134
- </para>
135
- </listitem>
136
- </varlistentry>
137
-
138
- <xi:include href="common.xmli" xpointer="xpointer(id('filelist.option')/*)" />
139
- </variablelist>
140
- </refsect1>
141
-
142
- <refsect1>
143
- <title>Output</title>
144
-
145
- <para>
146
- Currently, the only output style implemented is BSD, which is the default of GNU
147
- <command>nm</command>. In this style, the one-character symbol type code is not
148
- standardised, and is thus not identical to the one provided by either the GNU
149
- implementation or Ulrich Drepper's <command>eu-nm</command>.
150
- </para>
151
-
152
- <variablelist>
153
- <varlistentry>
154
- <term><literal>U</literal></term>
155
- <listitem>
156
- <para>
157
- The symbol is undefined.
158
- </para>
159
- </listitem>
160
- </varlistentry>
161
-
162
- <varlistentry>
163
- <term><literal>V</literal>, <literal>v</literal></term>
164
- <listitem>
165
- <para>
166
- The symbol is a weak reference to a data object. When uppercase, a default value is
167
- provided, otherwise it is zero.
168
- </para>
169
- </listitem>
170
- </varlistentry>
171
-
172
- <varlistentry>
173
- <term><literal>W</literal>, <literal>w</literal></term>
174
- <listitem>
175
- <para>
176
- The symbol is a weak reference to a function. When uppercase, a default value is
177
- provided, otherwise it is zero.
178
- </para>
179
- </listitem>
180
- </varlistentry>
181
-
182
- <varlistentry>
183
- <term><literal>A</literal></term>
184
- <listitem>
185
- <para>
186
- The symbol is an absolute address.
187
- </para>
188
- </listitem>
189
- </varlistentry>
190
-
191
- <varlistentry>
192
- <term><literal>C</literal></term>
193
- <listitem>
194
- <para>
195
- The symbol is common.
196
- </para>
197
- </listitem>
198
- </varlistentry>
199
-
200
- <varlistentry>
201
- <term><literal>D</literal>, <literal>d</literal></term>
202
- <listitem>
203
- <para>
204
- The symbol is a writable data object.
205
- </para>
206
- </listitem>
207
- </varlistentry>
208
-
209
- <varlistentry>
210
- <term><literal>R</literal>, <literal>r</literal></term>
211
- <listitem>
212
- <para>
213
- The symbol is a read-only data object. Note that relocated constants are still
214
- considered writable data objects as their value is set after execution.
215
- </para>
216
- </listitem>
217
- </varlistentry>
218
-
219
- <varlistentry>
220
- <term><literal>B</literal>, <literal>b</literal></term>
221
- <listitem>
222
- <para>
223
- The symbol is an uninitialised data object.
224
- </para>
225
- </listitem>
226
- </varlistentry>
227
-
228
- <varlistentry>
229
- <term><literal>N</literal></term>
230
- <listitem>
231
- <para>
232
- The symbol type is unspecified. This is usually used to refer to debug objects and
233
- notes, but the semantics of this code differ between GNU <command>nm</command> and
234
- <command>eu-nm</command>; we follow the latter.
235
- </para>
236
- </listitem>
237
- </varlistentry>
238
-
239
- <varlistentry>
240
- <term><literal>T</literal>, <literal>t</literal></term>
241
- <listitem>
242
- <para>
243
- The symbol is a function (text).
244
- </para>
245
- </listitem>
246
- </varlistentry>
247
-
248
- <varlistentry>
249
- <term><literal>S</literal></term>
250
- <listitem>
251
- <para>
252
- The symbol is a section reference. The semantics of this code differ between GNU
253
- <command>nm</command> and <command>eu-nm</command>; we follow the latter.
254
- </para>
255
- </listitem>
256
- </varlistentry>
257
-
258
- <varlistentry>
259
- <term><literal>F</literal></term>
260
- <listitem>
261
- <para>
262
- The symbol is a file reference.
263
- </para>
264
- </listitem>
265
- </varlistentry>
266
-
267
- <varlistentry>
268
- <term><literal>i</literal></term>
269
- <listitem>
270
- <para>
271
- The symbol is an indirect function (only valid as a GNU extension).
272
- </para>
273
- </listitem>
274
- </varlistentry>
275
-
276
- <varlistentry>
277
- <term><literal>i</literal></term>
278
- <listitem>
279
- <para>
280
- The symbol is an unique global symbol (only valid as a GNU extension).
281
- </para>
282
- </listitem>
283
- </varlistentry>
284
-
285
- </variablelist>
286
- </refsect1>
287
-
288
- <refsect1>
289
- <title>Bugs and Missing Features</title>
290
-
291
- <para>
292
- Contrarily to the standard <command>nm</command> implementations,
293
- <command>rbelf-nm</command> does not search for <filename>a.out</filename> when no
294
- parameter is provided. Instead, it waits for parameters on the standard input like the
295
- other Ruby-Elf utilities.
296
- </para>
297
-
298
- <para>
299
- Neither the full option set of GNU <command>nm</command> nor that of
300
- <command>eu-nm</command> are currently implemented and require more work. No output style
301
- beside BSD is currently implemented.
302
- </para>
303
-
304
- <para>
305
- Some of the codes from GNU <command>nm</command> are not implemented.
306
- </para>
307
-
308
- <xi:include href="common.xmli" xpointer="xpointer(id('filelist.bugpara')/*)" />
309
- </refsect1>
310
-
311
- <refsect1>
312
- <title>See Also</title>
313
- <para>
314
- <citation xl:href="http://blog.flameeyes.eu/">Flameeyes's Weblog</citation>
315
- http://blog.flameeyes.eu/
316
- </para>
317
-
318
- <para>
319
- Related tools:
320
-
321
- <citerefentry>
322
- <refentrytitle>nm</refentrytitle>
323
- <manvolnum>1</manvolnum>
324
- </citerefentry>
325
- </para>
326
- </refsect1>
327
- </refentry>
328
- </section>
329
- </article>
330
- <!--
331
- Local Variables:
332
- mode: nxml
333
- mode: auto-fill
334
- mode: flyspell
335
- ispell-local-dictionary: "english"
336
- fill-column: 100
337
- indent-tabs-mode: nil
338
- End:
339
- -->