Skip to content

Instantly share code, notes, and snippets.

@orangecms
Created April 17, 2022 00:15
Show Gist options
  • Save orangecms/8225172bd282a807bc61fc69f20b43b5 to your computer and use it in GitHub Desktop.
Save orangecms/8225172bd282a807bc61fc69f20b43b5 to your computer and use it in GitHub Desktop.
disassamble a few stupid single RISC-V instructions from 0x12345678 whatever
#!/bin/sh
_TMP=`mktemp`
echo -n $(rax2 -s "$1") > $_TMP
riscv64-linux-gnu-objdump -m riscv -b binary -D $_TMP | tail -n 5
rm $_TMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment