3 - 2019 by David Lamparter, placed in public domain
6 <title>Symalyzer report
</title>
7 <style type=
"text/css">
11 font-family:Fira Sans, sans-serif;
15 grid-template-columns:
1.4em
1.4em
1fr
1fr;
19 background-color:#ff8;
21 border:
1px solid #
000;
22 border-bottom:
2px solid #
000;
30 background-color:#ffa;
32 border-bottom:
1px solid #
000;
39 background-color:#ffc;
46 vertical-align:middle;
52 border:
1px solid #
666;
58 border:
1px solid #
666;
64 font-family:monospace;
67 border-bottom:
1px dashed #ccc;
73 border-bottom:
1px dashed #ccc;
81 background-color:#cf4;
84 .symtype.sym-extrastatic {
85 background-color:#fe8;
88 .symtype.sym-liblocal {
89 background-color:#fc6;
94 background-color:#ddd;
100 background-color:#faa;
104 background-color:#fd8;
109 background-color:#d9f;
114 background-color:#f8e8ff;
137 background-color:#eee;
139 text-decoration:underline;
143 display:inline-block;
145 border:
1px solid #
666;
150 <script src=
"jquery-3.4.1.min.js"></script>
153 function dirtoggle(elem, visible) {
155 elem.removeClass(
"dirhidden");
157 elem.addClass(
"dirhidden");
160 var next = elem.next();
161 while (next.is(
"dd") || next.is(
"dt.file")) {
163 next.removeClass(
"dirhidden");
165 next.addClass(
"dirhidden");
171 function filetoggle(elem, visible) {
173 elem.removeClass(
"filehidden");
175 elem.addClass(
"filehidden");
178 var next = elem.next();
179 while (next.is(
"dd")) {
181 next.removeClass(
"filehidden");
183 next.addClass(
"filehidden");
189 function symtoggle(elem, visible) {
191 elem.removeClass(
"symhidden");
193 elem.addClass(
"symhidden");
196 var next = elem.next();
197 while (next.is(
".symklass") || next.is(
".symname") || next.is(
".symloc")) {
199 next.removeClass(
"symhidden");
201 next.addClass(
"symhidden");
208 $(document).ready(function(){
209 $(
"dt.dir").each(function(){
212 elem.click(function(){
213 dirtoggle(elem, elem.is(
".dirhidden"));
216 dirtoggle(elem, false);
219 $(
"dt.file").each(function(){
222 elem.click(function(){
223 filetoggle(elem, elem.is(
".filehidden"));
226 /* filetoggle(elem, false); */
229 $(
"#f_hide_all").click(function(){
230 $(
"dt.file").each(function(){
231 filetoggle($(this), false);
234 $(
"#f_show_all").click(function(){
235 $(
"dt.file").each(function(){
236 filetoggle($(this), true);
240 $(
"#s_show_all").click(function(){
241 $(
"dd.symtype").each(function(){
242 symtoggle($(this), true);
245 $(
"#s_hide_all").click(function(){
246 $(
"dd.symtype").each(function(){
247 symtoggle($(this), false);
250 $(
"#s_show_vars").click(function(){
251 $(
"dd.symtype").each(function(){
252 var elem_type = $(this);
253 if (elem_type.text() ===
"A") {
257 var elem_klass = elem_type.next();
259 if (
"BbCDdGgnRrSs".indexOf(elem_klass.text())
>=
0) {
260 symtoggle(elem_type, true);
264 $(
"#s_show_funcs").click(function(){
265 $(
"dd.symtype").each(function(){
266 var elem_type = $(this);
267 if (elem_type.text() ===
"A") {
271 var elem_klass = elem_type.next();
273 if (
"Tt".indexOf(elem_klass.text())
>=
0) {
274 symtoggle(elem_type, true);
278 $(
"#s_show_api").click(function(){
279 $(
"dd.sym-api").each(function(){
280 symtoggle($(this), true);
284 $(
"#jsbuttons").show();
289 <table style=
"display:none" id=
"jsbuttons">
290 <tr><td>Files
</td><td>
291 <button type=
"button" id=
"f_hide_all">Hide all
</button>
292 <button type=
"button" id=
"f_show_all">Show all
</button>
294 <tr><td>Symbols
</td><td>
295 <button type=
"button" id=
"s_hide_all">Hide all
</button>
296 <button type=
"button" id=
"s_show_all">Show all
</button><br>
297 <button type=
"button" id=
"s_show_vars">Show variables
</button>
298 <button type=
"button" id=
"s_show_funcs">Show functions
</button>
299 <button type=
"button" id=
"s_show_api">Show module/API usage
</button>
302 <div style=
"display:grid;grid-template-columns:1fr 1fr;">
304 <li><b class=
"symtype sym-static">S
</b> means the symbol is not used outside its own file.
305 It could either be completely unused or used locally. It might be appropriate to make it
306 <code>static
</code>.
</li>
307 <li><b class=
"symtype sym-extrastatic">Z
</b> means the symbol is not used outside its own file,
308 and it's not visible to the outside of the library or daemon (i.e. ELF hidden linkage.)
309 It could still be completely unused, or used within the library. It might be appropriate to make it
310 <code>static
</code>.
</li>
311 <li><b class=
"symtype sym-liblocal">L
</b> means the symbol is used from other files in the library,
312 but not from outside. It might be appropriate to make it
<code>DSO_LOCAL
</code>.
</li>
313 <li><b class=
"symtype sym-api">A
</b> means the symbol is used from some other file, most likely a
314 loadable module. Note this is only flagged for symbols in executable files, not libraries.
</li>
317 <li><b class=
"symklass symk-T">T
</b> are normal functions (
"program <u>T</u>ext")
</li>
318 <li style=
"text-indent:0;margin-left:0">
319 <b class=
"symklass symk-B">B
</b> (
<u>B
</u>SS),
<br>
320 <b class=
"symklass symk-C">C
</b> (
<u>C
</u>ommon),
<br>
321 <b class=
"symklass symk-D">D
</b> (
<u>D
</u>ata)
<br>
322 are various types of writable global variables
</li>
323 <li><b class=
"symklass symk-R">R
</b> are read-only global variables (
"<u>R</u>odata")
</li>
327 {%- for subdir, subreport in dirgroups.items()|sort %}
328 <dt class=
"dir">{{ subdir }}
</dt>
329 {%- for obj, reports in subreport.items()|sort %}
330 <dt class=
"file">{{ obj }}
</dt>
331 {%- for report in reports|sort %}
332 {#-
<dd class=
"{{ report.idlong }}"> #}
333 <dd class=
"sym-{{ report.idlong }} symtype" title=
"{{ report.title }}">{{ report.idshort }}
</dd>
334 <dd class=
"sym-{{ report.idlong }} symk-{{ report.sym.klass }} symklass" title=
"{{ klasses.get(report.sym.klass, '???') }}">{{ report.sym.klass }}
</dd>
335 <dd class=
"sym-{{ report.idlong }} symname">{{ report.sym.name }}
</dd>
336 {% if report.sym.loc %}
337 <dd class=
"sym-{{ report.idlong }} symloc">{{ report.sym.loc }}
</dd>
339 <dd class=
"sym-{{ report.idlong }} symloc symloc-unknown">unknown
</dd>