das-labor / panopticon

A libre cross-platform disassembler.
https://panopticon.re
GNU General Public License v3.0
1.43k stars 78 forks source link

CLI: bad overlapping functions in sorted output #311

Open m4b opened 7 years ago

m4b commented 7 years ago

I can't explain why they overlap. it looks like because frame_dummy contains the function before it (which has a higher start address), but the display with logic should still sort it before, since it uses bb.area.start; not sure why this is happening.

000006f0 <register_tm_clones>:
     6f0: lea rdi, 201048
     6f7: lea rsi, 201048
     6fe: push rbp
     6ff: sub rsi, rdi
     702: mov rbp, rsp
     705: sar rsi, 3
     709: mov rax, rsi
     70c: shr rax, 3f
     710: add rsi, rax
     713: sar rsi, 1
     716: je 730
     718: mov rax, qword ptr [0x200ff0]
     71f: test rax, rax
     722: je 730
     724: pop rbp
     725: jmp RAX
     730: pop rbp
     731: ret 
00000740 <__do_global_dtors_aux>:
     740: cmp byte ptr [0x201047], 0
     747: jne 770
     749: cmp qword ptr [0x200ff7], 0
     751: push rbp
     752: mov rbp, rsp
     755: je 763
     757: mov rdi, qword ptr [0x201040]
     75e: call 6a0
     763: call 6b0
     768: pop rbp
     769: mov byte ptr [0x201047], 1
     770: ret 
000006f0 <frame_dummy>:
     6f0: lea rdi, 201048
     6f7: lea rsi, 201048
     6fe: push rbp
     6ff: sub rsi, rdi
     702: mov rbp, rsp
     705: sar rsi, 3
     709: mov rax, rsi
     70c: shr rax, 3f
     710: add rsi, rax
     713: sar rsi, 1
     716: je 730
     718: mov rax, qword ptr [0x200ff0]
     71f: test rax, rax
     722: je 730
     724: pop rbp
     725: jmp RAX
     730: pop rbp
     731: ret 
     780: lea rdi, 200e10
     787: cmp rdi, 0
     78b: jne 798
     78d: jmp 6f0
     798: mov rax, qword ptr [0x200fe8]
     79f: test rax, rax
     7a2: je 78d
     7a4: push rbp
     7a5: mov rbp, rsp
     7a8: call RAX
     7aa: pop rbp
     7ab: jmp 6f0