Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] DEC Alpha disassembly and analysis plugins #4059

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

XVilka
Copy link
Member

@XVilka XVilka commented Dec 31, 2023

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

Adds DEC Alpha architecture support

File for testing (from Debian Alpha port)
resolv.zip

rizin -A resolv
[0x120000710]> is
nth paddr      vaddr       bind   type size lib name
----------------------------------------------------------------------
8   0x00002060 0x120012060 GLOBAL OBJ  4        _IO_stdin_used
1   0x00000574 0x120000574 GLOBAL FUNC 16       imp.puts
2   0x00000578 0x120000578 GLOBAL FUNC 16       imp.__libc_start_main
3   0x0000057c 0x12000057c GLOBAL FUNC 16       imp.__printf_chk
4   0x00000580 0x120000580 GLOBAL FUNC 16       imp.gai_strerror
5   0x00000584 0x120000584 GLOBAL FUNC 16       imp.freeaddrinfo
6   0x00000588 0x120000588 GLOBAL FUNC 16       imp.inet_ntop
7   0x0000058c 0x12000058c GLOBAL FUNC 16       imp.getaddrinfo
[0x120000710]> afl
0x120000714    1 100          fcn.120000714
0x120000574    1 4            sym.imp.puts
0x120000578    1 4            sym.imp.__libc_start_main
0x12000057c    1 4            sym.imp.__printf_chk
0x120000580    1 4            sym.imp.gai_strerror
0x120000584    1 4            sym.imp.freeaddrinfo
0x120000588    1 4            sym.imp.inet_ntop
0x12000058c    1 4            sym.imp.getaddrinfo
0x120000712    1 2            fcn.120000712
0x120000870    1 16           entry.init0
0x120000800    1 44           entry.fini0
[0x120000710]> pdf @ fcn.120000714
╭ fcn.120000714();
│           0x120000714      0200bd27       ldah  $15,2($15)
│           0x120000718      fc98bd23       lda   $15,0x98fc($15)
│           0x12000071c      3e15c243       subq  $30,0x10,$30
│           0x120000720      0f14e047       bis   $31,0,$22
│           0x120000724      30801da6       ldq   $23,0x8030($15)
│           0x120000728      10003ea2       ldl   $24,0x10($30)
│           0x12000072c      18005e22       lda   $25,0x18($30)
│           0x120000730      18807da6       ldq   $28,0x8018($15)
│           0x120000734      00809da6       ldq   $27,0x8000($15)
│           0x120000738      1504e047       bis   $31,$0,$26
│           0x12000073c      0000deb7       stq   $30,0($30)
│           0x120000740      10807da7       ldq   $13,0x8010($15)
│           0x120000744      00405b6b       jsr   $26,($27),segment.GNU_STACK
│           0x120000748      00000000       COND_BRANCH imm:0, GPRC:$0, bb:0x120000750
│           0x12000074c      0000fe2f       ldq_u $31,0($30)
│           0x120000750      0200bb27       ldah  $15,2($13)
│           0x120000754      c098bd23       lda   $15,0x98c0($15)
│           0x120000758      f0ffde23       lda   $30,0xfff0($30)
│           0x12000075c      ffff1d26       ldah  $23,0xffff($15)
│           0x120000760      f07f1022       lda   $23,0x7ff0($23)
│           0x120000764      00005eb7       stq   $12,0($30)
│           0x120000768      ffff3d24       ldah  $1,0xffff($15)
│           0x12000076c      f07f2120       lda   $1,0x7ff0($1)
│           0x120000770      a1053040       cmpeq $1,$23,$1
╰       ╭─< 0x120000774      050020f4       bne   $1,0x12000078c

Test plan

CI is green

Closing issues

closes rizinorg/ideas#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for DEC Alpha architecture
1 participant