3 - SPDX-License-Identifier: NONE
4 - 2019 by David Lamparter, placed in public domain
7 <title>Symalyzer report
</title>
8 <style type=
"text/css">
12 font-family:Fira Sans, sans-serif;
16 grid-template-columns:
1.4em
1.4em
1fr
1fr;
20 background-color:#ff8;
22 border:
1px solid #
000;
23 border-bottom:
2px solid #
000;
31 background-color:#ffa;
33 border-bottom:
1px solid #
000;
40 background-color:#ffc;
47 vertical-align:middle;
53 border:
1px solid #
666;
59 border:
1px solid #
666;
65 font-family:monospace;
68 border-bottom:
1px dashed #ccc;
74 border-bottom:
1px dashed #ccc;
82 background-color:#cf4;
85 .symtype.sym-extrastatic {
86 background-color:#fe8;
89 .symtype.sym-liblocal {
90 background-color:#fc6;
95 background-color:#ddd;
101 background-color:#faa;
105 background-color:#fd8;
110 background-color:#d9f;
115 background-color:#f8e8ff;
138 background-color:#eee;
140 text-decoration:underline;
144 display:inline-block;
146 border:
1px solid #
666;
151 <script src=
"jquery-3.4.1.min.js"></script>
154 function dirtoggle(elem, visible) {
156 elem.removeClass(
"dirhidden");
158 elem.addClass(
"dirhidden");
161 var next = elem.next();
162 while (next.is(
"dd") || next.is(
"dt.file")) {
164 next.removeClass(
"dirhidden");
166 next.addClass(
"dirhidden");
172 function filetoggle(elem, visible) {
174 elem.removeClass(
"filehidden");
176 elem.addClass(
"filehidden");
179 var next = elem.next();
180 while (next.is(
"dd")) {
182 next.removeClass(
"filehidden");
184 next.addClass(
"filehidden");
190 function symtoggle(elem, visible) {
192 elem.removeClass(
"symhidden");
194 elem.addClass(
"symhidden");
197 var next = elem.next();
198 while (next.is(
".symklass") || next.is(
".symname") || next.is(
".symloc")) {
200 next.removeClass(
"symhidden");
202 next.addClass(
"symhidden");
209 $(document).ready(function(){
210 $(
"dt.dir").each(function(){
213 elem.click(function(){
214 dirtoggle(elem, elem.is(
".dirhidden"));
217 dirtoggle(elem, false);
220 $(
"dt.file").each(function(){
223 elem.click(function(){
224 filetoggle(elem, elem.is(
".filehidden"));
227 /* filetoggle(elem, false); */
230 $(
"#f_hide_all").click(function(){
231 $(
"dt.file").each(function(){
232 filetoggle($(this), false);
235 $(
"#f_show_all").click(function(){
236 $(
"dt.file").each(function(){
237 filetoggle($(this), true);
241 $(
"#s_show_all").click(function(){
242 $(
"dd.symtype").each(function(){
243 symtoggle($(this), true);
246 $(
"#s_hide_all").click(function(){
247 $(
"dd.symtype").each(function(){
248 symtoggle($(this), false);
251 $(
"#s_show_vars").click(function(){
252 $(
"dd.symtype").each(function(){
253 var elem_type = $(this);
254 if (elem_type.text() ===
"A") {
258 var elem_klass = elem_type.next();
260 if (
"BbCDdGgnRrSs".indexOf(elem_klass.text())
>=
0) {
261 symtoggle(elem_type, true);
265 $(
"#s_show_funcs").click(function(){
266 $(
"dd.symtype").each(function(){
267 var elem_type = $(this);
268 if (elem_type.text() ===
"A") {
272 var elem_klass = elem_type.next();
274 if (
"Tt".indexOf(elem_klass.text())
>=
0) {
275 symtoggle(elem_type, true);
279 $(
"#s_show_api").click(function(){
280 $(
"dd.sym-api").each(function(){
281 symtoggle($(this), true);
285 $(
"#jsbuttons").show();
290 <table style=
"display:none" id=
"jsbuttons">
291 <tr><td>Files
</td><td>
292 <button type=
"button" id=
"f_hide_all">Hide all
</button>
293 <button type=
"button" id=
"f_show_all">Show all
</button>
295 <tr><td>Symbols
</td><td>
296 <button type=
"button" id=
"s_hide_all">Hide all
</button>
297 <button type=
"button" id=
"s_show_all">Show all
</button><br>
298 <button type=
"button" id=
"s_show_vars">Show variables
</button>
299 <button type=
"button" id=
"s_show_funcs">Show functions
</button>
300 <button type=
"button" id=
"s_show_api">Show module/API usage
</button>
303 <div style=
"display:grid;grid-template-columns:1fr 1fr;">
305 <li><b class=
"symtype sym-static">S
</b> means the symbol is not used outside its own file.
306 It could either be completely unused or used locally. It might be appropriate to make it
307 <code>static
</code>.
</li>
308 <li><b class=
"symtype sym-extrastatic">Z
</b> means the symbol is not used outside its own file,
309 and it's not visible to the outside of the library or daemon (i.e. ELF hidden linkage.)
310 It could still be completely unused, or used within the library. It might be appropriate to make it
311 <code>static
</code>.
</li>
312 <li><b class=
"symtype sym-liblocal">L
</b> means the symbol is used from other files in the library,
313 but not from outside. It might be appropriate to make it
<code>DSO_LOCAL
</code>.
</li>
314 <li><b class=
"symtype sym-api">A
</b> means the symbol is used from some other file, most likely a
315 loadable module. Note this is only flagged for symbols in executable files, not libraries.
</li>
318 <li><b class=
"symklass symk-T">T
</b> are normal functions (
"program <u>T</u>ext")
</li>
319 <li style=
"text-indent:0;margin-left:0">
320 <b class=
"symklass symk-B">B
</b> (
<u>B
</u>SS),
<br>
321 <b class=
"symklass symk-C">C
</b> (
<u>C
</u>ommon),
<br>
322 <b class=
"symklass symk-D">D
</b> (
<u>D
</u>ata)
<br>
323 are various types of writable global variables
</li>
324 <li><b class=
"symklass symk-R">R
</b> are read-only global variables (
"<u>R</u>odata")
</li>
328 {%- for subdir, subreport in dirgroups.items()|sort %}
329 <dt class=
"dir">{{ subdir }}
</dt>
330 {%- for obj, reports in subreport.items()|sort %}
331 <dt class=
"file">{{ obj }}
</dt>
332 {%- for report in reports|sort %}
333 {#-
<dd class=
"{{ report.idlong }}"> #}
334 <dd class=
"sym-{{ report.idlong }} symtype" title=
"{{ report.title }}">{{ report.idshort }}
</dd>
335 <dd class=
"sym-{{ report.idlong }} symk-{{ report.sym.klass }} symklass" title=
"{{ klasses.get(report.sym.klass, '???') }}">{{ report.sym.klass }}
</dd>
336 <dd class=
"sym-{{ report.idlong }} symname">{{ report.sym.name }}
</dd>
337 {% if report.sym.loc %}
338 <dd class=
"sym-{{ report.idlong }} symloc">{{ report.sym.loc }}
</dd>
340 <dd class=
"sym-{{ report.idlong }} symloc symloc-unknown">unknown
</dd>