changeset 140:21fda9752bd9

OSL flash objects: created disasm hints for os_com through os_mis
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 09 Apr 2014 02:40:20 +0000
parents acdf75463e30
children db16876a2684
files leo-obj/README leo-obj/frame_na7_db_fl/Makefile leo-obj/frame_na7_db_fl/os_com.hints leo-obj/frame_na7_db_fl/os_drv.hints leo-obj/frame_na7_db_fl/os_isr.hints leo-obj/frame_na7_db_fl/os_mem.hints leo-obj/frame_na7_db_fl/os_mis.hints leo-obj/toolwrap/disasm-wrap.sh
diffstat 8 files changed, 96 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/leo-obj/README	Mon Apr 07 07:36:31 2014 +0000
+++ b/leo-obj/README	Wed Apr 09 02:40:20 2014 +0000
@@ -8,4 +8,15 @@
 the same functions and global variables etc, with logic inside matching the
 disassembly of the original.
 
-The present directory tree will hold the just-described project.
+The present directory tree holds the just-described project - running 'make'
+here will first build the tiobjd tool, then run this tool on a bunch of TI's
+objects, applying some hand-added disassembly hints in many cases.
+
+It is noteworthy that there are two kinds of COFF object blobs present in the
+TCS211 semi-src, with respect to the amount of symbolic information present
+therein.  The objects contained in the binary libraries under
+g23m/__out__/gsm_<blah>/lib have just the minimal amount of symbolic info
+needed in order for these objects to be relocatable and linkable, whereas the
+objects in the GPF libraries under gpf/LIB exhibit much richer "-g"-style
+symbolic information.  Our current tiobjd tool does not really take advantage
+of the richer symbolic info yet, but more work is planned in that area.
--- a/leo-obj/frame_na7_db_fl/Makefile	Mon Apr 07 07:36:31 2014 +0000
+++ b/leo-obj/frame_na7_db_fl/Makefile	Wed Apr 09 02:40:20 2014 +0000
@@ -1,13 +1,15 @@
-OSL=	os_com.disasm os_drv.disasm os_evt.disasm os_isr.disasm os_mem.disasm \
-	os_mis.disasm os_pro.disasm os_sem.disasm os_tim.disasm
-TARGETS=${OSL}
+OSL=	os_com.obj os_drv.obj os_evt.obj os_isr.obj os_mem.obj os_mis.obj \
+	os_pro.obj os_sem.obj os_tim.obj
+OBJS=	${OSL}
+TARGETS=$(patsubst %.obj,%.disasm,${OBJS})
 TOOL=	../tool/tiobjd
 
 all:	${TARGETS}
 
-.SUFFIXES:	.obj .disasm
+%.disasm:	%.obj %.hints
+	${TOOL} $*.obj disasm -h $*.hints > $@
 
-.obj.disasm:
+%.disasm:	%.obj
 	${TOOL} $*.obj disasm > $@
 
 ${TARGETS}:	${TOOL} Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/leo-obj/frame_na7_db_fl/os_com.hints	Wed Apr 09 02:40:20 2014 +0000
@@ -0,0 +1,4 @@
+[.text]
+
+3ac asciz
+5d8 asciz
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/leo-obj/frame_na7_db_fl/os_drv.hints	Wed Apr 09 02:40:20 2014 +0000
@@ -0,0 +1,3 @@
+[.text]
+
+6c asciz
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/leo-obj/frame_na7_db_fl/os_isr.hints	Wed Apr 09 02:40:20 2014 +0000
@@ -0,0 +1,3 @@
+[.text]
+
+258 d32
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/leo-obj/frame_na7_db_fl/os_mem.hints	Wed Apr 09 02:40:20 2014 +0000
@@ -0,0 +1,9 @@
+[.text]
+
+378 asciz
+3b8 asciz
+3f4 asciz
+40c d32
+510 linebrk
+6d4 linebrk
+780 asciz
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/leo-obj/frame_na7_db_fl/os_mis.hints	Wed Apr 09 02:40:20 2014 +0000
@@ -0,0 +1,43 @@
+[.text]
+
+33c asciz
+364 asciz
+378 asciz
+384 asciz
+390 asciz
+3a0 d32
+3ac d32
+54c linebrk
+5e8 linebrk
+76c asciz
+774 d32
+77c linebrk
+860 linebrk
+898 asciz
+8a4 asciz
+8e0 asciz
+918 asciz
+950 linebrk
+9a4 linebrk
+a58 asciz
+a9c linebrk
+acc asciz
+b14 linebrk
+c00 linebrk
+d08 asciz
+df0 asciz
+dfc asciz
+e10-e14 d32
+e28 asciz
+e34 asciz
+e38 asciz
+e4c asciz
+e60 asciz
+e78 asciz
+e90 asciz
+ea4 asciz
+eb0 asciz
+ec0 asciz
+ecc asciz
+ed4 asciz
+edc asciz
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/leo-obj/toolwrap/disasm-wrap.sh	Wed Apr 09 02:40:20 2014 +0000
@@ -0,0 +1,15 @@
+#!/bin/sh
+if [ $# != 3 ]
+then
+	echo "usage: $0 objfile hints-file disasm-outfile" >&2
+	exit 1
+fi
+
+if [ -f $2 ]
+then
+	set -x
+	../tool/tiobjd $1 disasm -h $2 > $3
+else
+	set -x
+	../tool/tiobjd $1 disasm > $3
+fi