changeset 107:c883e60df239

arm7dis: README and header comments added
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 31 Mar 2014 06:49:27 +0000
parents a39a38bbec4d
children 85bb35342834
files arm7dis/README arm7dis/armdis.c arm7dis/atcommon.c arm7dis/common.c arm7dis/thumbdis.c
diffstat 5 files changed, 46 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/arm7dis/README	Mon Mar 31 06:49:27 2014 +0000
@@ -0,0 +1,26 @@
+The present package is a basic standalone disassembler for the ARMv4T
+instruction set implemented on the ARM7TDMI CPU core, commonly used in classic
+cellular phone baseband processors.  The armdis utility interprets an arbitrary
+raw binary image (i.e., one being reverse-engineered) as 32-bit ARM
+instructions; thumbdis interprets the same image as 16-bit Thumb instructions.
+
+The form in which the disassembly output is presented is a look-and-feel copycat
+of GNU objdump: armdis is meant to replace
+
+objdump -b binary -m arm -EL -M reg-names-std -D unknown-firmware.bin
+
+and thumbdis is meant to replace
+
+objdump -b binary -m arm -EL -M reg-names-std -M force-thumb -D unknown-fw.bin
+
+Aside from sparing the operator from having to remember all those options
+every single time, and aside from being an independent from-scratch
+implementation (lean and mean, only knows how to disassemble those instructions
+which are meaningful on ARM7TDMI), these tools have one other feature which
+partly prompted me to write them: whenever *dis disassembles a PC-relative
+ldr instruction, it shows the value pulled from the literal pool on that ldr
+line.  In the reverse engineering jobs I've had to do, it has been a very
+valuable feature for me.
+
+Happy hacking,
+Spacefalcon the Outlaw
--- a/arm7dis/armdis.c	Mon Mar 31 06:33:14 2014 +0000
+++ b/arm7dis/armdis.c	Mon Mar 31 06:49:27 2014 +0000
@@ -1,3 +1,8 @@
+/*
+ * Lean and mean ARM7TDMI disassembler
+ * Written by Spacefalcon the Outlaw
+ */
+
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/arm7dis/atcommon.c	Mon Mar 31 06:33:14 2014 +0000
+++ b/arm7dis/atcommon.c	Mon Mar 31 06:49:27 2014 +0000
@@ -1,3 +1,8 @@
+/*
+ * Lean and mean ARM7TDMI disassembler
+ * Written by Spacefalcon the Outlaw
+ */
+
 /* a few disassembly bits common between ARM and Thumb */
 
 char *regnames[16] = {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
--- a/arm7dis/common.c	Mon Mar 31 06:33:14 2014 +0000
+++ b/arm7dis/common.c	Mon Mar 31 06:49:27 2014 +0000
@@ -1,3 +1,8 @@
+/*
+ * Lean and mean ARM7TDMI disassembler
+ * Written by Spacefalcon the Outlaw
+ */
+
 #include <sys/types.h>
 #include <sys/file.h>
 #include <sys/stat.h>
--- a/arm7dis/thumbdis.c	Mon Mar 31 06:33:14 2014 +0000
+++ b/arm7dis/thumbdis.c	Mon Mar 31 06:49:27 2014 +0000
@@ -1,3 +1,8 @@
+/*
+ * Lean and mean ARM7TDMI disassembler
+ * Written by Spacefalcon the Outlaw
+ */
+
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>