-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbug-san0-dbg0-64-visualize.html
5571 lines (5482 loc) · 196 KB
/
bug-san0-dbg0-64-visualize.html
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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=900, initial-scale=1'>
<title>bug-san0-dbg0-64</title>
<style>
html {
font-family: monospace;
}
#headertable {
width: 100%;
}
#rightmenu {
vertical-align: top;
text-align: right;
float: right;
}
#credits {
color: #ddd;
text-decoration: none;
margin-bottom: 0.5em;
display: block;
}
#credits:hover {
color: #000;
}
#arrow_opacity_range {
width: 8em;
}
.right_hidden {
text-align: left;
display: none;
}
.textbutton {
color: #222;
cursor: pointer;
background: none;
border: none;
padding: 0;
margin: 0;
margin-bottom: 0.5em;
}
.textbutton::before {
content: "[";
}
.textbutton::after {
content: "]";
}
.textbutton:hover {
color: #922;
}
.textbutton:active {
color: #d11;
}
.textbutton:hover::before {
color: #222;
}
.textbutton:hover::after {
color: #222;
}
label, input {
vertical-align: middle;
}
.legend_rect {
float: left;
margin-right: 0.4em;
width: 3em;
height: 1.5em;
border: 1px solid rgba(0, 0, 0, .2);
}
ul {
list-style: none;
padding: 0;
}
#help > p {
margin-top: 0;
margin-bottom: 0.5em;
width: 29em;
}
#help > ul {
margin-top: 0;
}
#help > p + p {
margin-top: 1em;
}
li {
clear: left;
height: 2em;
display: flex;
flex-direction: row;
align-items: center;
}
.number {
text-decoration: underline dotted #888;
}
#desc {
width: 250px;
}
.infotables {
padding: 0;
display: block;
}
.conceal {
display: none;
border: 1px solid #000;
max-width: 600px;
margin-bottom: 1em;
}
.conceal div {
word-break: break-word;
}
.indirect .phdr_itable::after {
content: " (references this segment)";
}
.indirect .shdr_itable::after {
content: " (references this section)";
}
.phdr_itable::before {
content: "Program header";
}
.shdr_itable::before {
content: "Section header";
}
.phdr_itable {
text-align: left;
}
.shdr_itable {
text-align: left;
}
.segment_itable::before {
content: "Segment";
}
.section_itable::before {
content: "Section";
}
.segment_itable {
text-align: left;
}
.section_itable {
text-align: left;
}
#offsets {
display: inline-block;
text-align: right;
white-space: pre;
}
#bytes {
border: 1px solid;
display: inline-block;
word-break: break-word;
/* 16 bytes * (2 chars per byte + 1 space) - 1 final space */
width: 47ch;
white-space: pre;
}
#ascii {
border: 1px solid;
display: inline-block;
width: 16ch;
white-space: pre;
}
#vmap {
border: 1px solid;
display: inline-block;
width: 47ch;
vertical-align: top;
position: sticky;
top: 8px;
}
#sticky_table {
display: inline-block;
vertical-align: top;
position: sticky;
top: 8px;
}
#desc, .itable {
vertical-align: top;
}
.hover:hover {
background-color: #ee9;
}
.ident {
background-color: #e99;
}
/* highlight fields */
.ident:hover > span {
background-color: #ebb;
}
/* Duplicate of .hover:hover with more specifity. Used for elements like `#magic', for whom
* rule `.ident:hover > span' would override rule `.hover:hover' */
.ident:hover > span:hover {
background-color: #ee9;
}
/* same for .ehdr, but we also don't want to highlight .ident */
.ehdr {
background-color: #99e;
}
.ehdr:hover > span:not(.ident) {
background-color: #bbe;
}
.ehdr:hover > span:not(.ident):hover {
background-color: #ee9;
}
.phdr {
background-color: #eb9;
}
.phdr:hover > span {
background-color: #ed9;
}
.phdr:hover > span:hover {
background-color: #ef9;
}
.shdr {
background-color: #9be;
}
.shdr:hover > span {
background-color: #9de;
}
.shdr:hover > span:hover {
background-color: #9fe;
}
.segment {
background-color: #f99;
}
.section {
background-color: #f9f;
}
/* there are only sections inside segments due to code */
.segment > .section, .segm_sect_legend {
background: repeating-linear-gradient(
-45deg,
#f99,
#f99 10px,
#f9f 10px,
#f9f 20px
);
}
/* another duplicate of .hover:hover with more specifity */
.segment > .section:hover {
background: initial;
background-color: #ee9;
}
.segment > .segment_subrange:hover {
background: initial;
background-color: #f59;
}
svg {
position: absolute;
left: 0;
right: 0;
pointer-events: none;
overflow: visible;
}
</style>
</head>
<body>
<svg width='100%' height='100%'>
<defs>
<marker id='arrowhead' viewBox='0 0 10 10' refX='10' refY='5' markerWidth='10' markerHeight='10' orient='auto'>
<path d='M 0 0 L 10 5 L 0 10 z' />
</marker>
</defs>
<g id='arrows' stroke='black' stroke-width='1' marker-end='url(#arrowhead)'></g>
</svg>
<div id='rightmenu'>
<a id='credits' href='https://github.com/ruslashev/elfcat'>generated with elfcat 0.1.8</a>
<button class='textbutton' id='settings_toggle'>Settings</button>
<button class='textbutton' id='help_toggle'>Help</button>
<div class='right_hidden' id='settings'>
<label for='arrow_opacity_range'>Arrow opacity:</label>
<input type='range' id='arrow_opacity_range' min='0' max='100' value='100'>
</div>
<div class='right_hidden' id='help'>
<p>The leftmost column shows offsets within the file. The middle column is the file dump. It has ELF structs, sections and segments highlighted. Some fields that reference areas in the file are clickable and connected with arrows. The rightmost column shows printable ASCII characters corresponding to the file bytes.</p>
<p>Legend</p>
<ul>
<li><span class='legend_rect ident'></span>ELF Identification</li>
<li><span class='legend_rect ehdr'></span>ELF Header</li>
<li><span class='legend_rect phdr'></span>Program Header</li>
<li><span class='legend_rect shdr'></span>Section Header</li>
<li><span class='legend_rect segment'></span>Segment</li>
<li><span class='legend_rect section'></span>Section</li>
<li><span class='legend_rect segm_sect_legend'></span>Segment & Section overlap</li>
</ul>
</div>
</div>
<table>
<tr class='fileinfo_file_name'> <td>File name:</td> <td>bug-san0-dbg0-64</td> </tr>
<tr class='fileinfo_file_size'> <td>File size:</td> <td>19.6 KiB (20024 B)</td> </tr>
<tr class='fileinfo_class'> <td>Object class:</td> <td>64-bit</td> </tr>
<tr class='fileinfo_data'> <td>Data encoding:</td> <td>Little endian</td> </tr>
<tr class='fileinfo_abi'> <td>ABI:</td> <td>SysV</td> </tr>
<tr class='fileinfo_e_type'> <td>Type:</td> <td>Shared object file (DYN)</td> </tr>
<tr class='fileinfo_e_machine'> <td>Architecture:</td> <td>x86-64</td> </tr>
<tr class='fileinfo_e_entry'> <td>Entrypoint:</td> <td><span class='number' title='4896'>0x1320</span></td> </tr>
<tr class='fileinfo_ph'> <td>Program headers:</td> <td><span title='0xd' class='number fileinfo_e_phnum'>13</span> * <span title='0x38' class='number fileinfo_e_phentsize'>56</span> @ <span title='0x40' class='number fileinfo_e_phoff'>64</span></td> </tr>
<tr class='fileinfo_sh'> <td>Section headers:</td> <td><span title='0x20' class='number fileinfo_e_shnum'>32</span> * <span title='0x40' class='number fileinfo_e_shentsize'>64</span> @ <span title='0x4638' class='number fileinfo_e_shoff'>17976</span></td> </tr>
</table>
<div id='offsets'>0
10
20
30
40
50
60
70
80
90
a0
b0
c0
d0
e0
f0
100
110
120
130
140
150
160
170
180
190
1a0
1b0
1c0
1d0
1e0
1f0
200
210
220
230
240
250
260
270
280
290
2a0
2b0
2c0
2d0
2e0
2f0
300
310
320
330
340
350
360
370
380
390
3a0
3b0
3c0
3d0
3e0
3f0
400
410
420
430
440
450
460
470
480
490
4a0
4b0
4c0
4d0
4e0
4f0
500
510
520
530
540
550
560
570
580
590
5a0
5b0
5c0
5d0
5e0
5f0
600
610
620
630
640
650
660
670
680
690
6a0
6b0
6c0
6d0
6e0
6f0
700
710
720
730
740
750
760
770
780
790
7a0
7b0
7c0
7d0
7e0
7f0
800
810
820
830
840
850
860
870
880
890
8a0
8b0
8c0
8d0
8e0
8f0
900
910
920
930
940
950
960
970
980
990
9a0
9b0
9c0
9d0
9e0
9f0
a00
a10
a20
a30
a40
a50
a60
a70
a80
a90
aa0
ab0
ac0
ad0
ae0
af0
b00
b10
b20
b30
b40
b50
b60
b70
b80
b90
ba0
bb0
bc0
bd0
be0
bf0
c00
c10
c20
c30
c40
c50
c60
c70
c80
c90
ca0
cb0
cc0
cd0
ce0
cf0
d00
d10
d20
d30
d40
d50
d60
d70
d80
d90
da0
db0
dc0
dd0
de0
df0
e00
e10
e20
e30
e40
e50
e60
e70
e80
e90
ea0
eb0
ec0
ed0
ee0
ef0
f00
f10
f20
f30
f40
f50
f60
f70
f80
f90
fa0
fb0
fc0
fd0
fe0
ff0
1000
1010
1020
1030
1040
1050
1060
1070
1080
1090
10a0
10b0
10c0
10d0
10e0
10f0
1100
1110
1120
1130
1140
1150
1160
1170
1180
1190
11a0
11b0
11c0
11d0
11e0
11f0
1200
1210
1220
1230
1240
1250
1260
1270
1280
1290
12a0
12b0
12c0
12d0
12e0
12f0
1300
1310
1320
1330
1340
1350
1360
1370
1380
1390
13a0
13b0
13c0
13d0
13e0
13f0
1400
1410
1420
1430
1440
1450
1460
1470
1480
1490
14a0
14b0
14c0
14d0
14e0
14f0
1500
1510
1520
1530
1540
1550
1560
1570
1580
1590
15a0
15b0
15c0
15d0
15e0
15f0
1600
1610
1620
1630
1640
1650
1660
1670
1680
1690
16a0
16b0
16c0
16d0
16e0
16f0
1700
1710
1720
1730
1740
1750
1760
1770
1780
1790
17a0
17b0
17c0
17d0
17e0
17f0
1800
1810
1820
1830
1840
1850
1860
1870
1880
1890
18a0
18b0
18c0
18d0
18e0
18f0
1900
1910
1920
1930
1940
1950
1960
1970
1980
1990
19a0
19b0
19c0
19d0
19e0
19f0
1a00
1a10
1a20
1a30
1a40
1a50
1a60
1a70
1a80
1a90
1aa0
1ab0
1ac0
1ad0
1ae0
1af0
1b00
1b10
1b20
1b30
1b40
1b50
1b60
1b70
1b80
1b90
1ba0
1bb0
1bc0
1bd0
1be0
1bf0
1c00
1c10
1c20
1c30
1c40
1c50
1c60
1c70
1c80
1c90
1ca0
1cb0
1cc0
1cd0
1ce0
1cf0
1d00
1d10
1d20
1d30
1d40
1d50
1d60
1d70
1d80
1d90
1da0
1db0
1dc0
1dd0
1de0
1df0
1e00
1e10
1e20
1e30
1e40
1e50
1e60
1e70
1e80
1e90
1ea0
1eb0
1ec0
1ed0
1ee0
1ef0
1f00
1f10
1f20
1f30
1f40
1f50
1f60
1f70
1f80
1f90
1fa0
1fb0
1fc0
1fd0
1fe0
1ff0
2000
2010
2020
2030
2040
2050
2060
2070
2080
2090
20a0
20b0
20c0
20d0
20e0
20f0
2100
2110
2120
2130
2140
2150
2160
2170
2180
2190
21a0
21b0
21c0
21d0
21e0
21f0
2200
2210
2220
2230
2240
2250
2260
2270
2280
2290
22a0
22b0
22c0
22d0
22e0
22f0
2300
2310
2320
2330
2340
2350
2360
2370
2380
2390
23a0
23b0
23c0
23d0
23e0
23f0
2400
2410
2420
2430
2440
2450
2460
2470
2480
2490
24a0
24b0
24c0
24d0
24e0
24f0
2500
2510
2520
2530
2540
2550
2560
2570
2580
2590
25a0
25b0
25c0
25d0
25e0
25f0
2600
2610
2620
2630
2640
2650
2660
2670
2680
2690
26a0
26b0
26c0
26d0
26e0
26f0
2700
2710
2720
2730
2740
2750
2760
2770
2780
2790
27a0
27b0
27c0
27d0
27e0
27f0
2800
2810
2820
2830
2840
2850
2860
2870
2880
2890
28a0
28b0
28c0
28d0
28e0
28f0
2900
2910
2920
2930
2940
2950
2960
2970
2980
2990
29a0
29b0
29c0
29d0
29e0
29f0
2a00
2a10
2a20
2a30
2a40
2a50
2a60
2a70
2a80
2a90
2aa0
2ab0
2ac0
2ad0
2ae0
2af0
2b00
2b10
2b20
2b30
2b40
2b50
2b60