doj文件中的.annotation段

本文详细解析了ADSP BF561 DSP中Doj文件的结构与内容,包括注释段(.annotation)的格式及具体信息解读。通过实例展示了编译过程中生成的各种元数据,如编译选项、寄存器使用情况等。

 

快乐虾

http://blog.youkuaiyun.com/lights_joy/

lights@hb165.com

 

本文适用于

ADI BF561 DSP

Visual DSP++ 5.0

 

欢迎转载,但请保留作者信息

 

Doj文件是vdsp中的目标文件,它使用elf格式,但是根据需要做了一些扩展,.annotation这个section就是其中之一。这个段用于存放一些提示信息。下面以u-boot-2008r1/cpu/cpu.c编译生成的cpu.doj文件为例进行分析。

这个文件的段头如下:

 

table 0属性值附加说明
sh_name1578Section name, index in string tbl
sh_typeFINI_ARRAYType of section
sh_flags0x00020000Miscellaneous section attributes
sh_addr0x00000000Section virtual addr at execution
sh_offset16399Section file offset
sh_size3232Size of section in bytes
sh_link0Index of another section
sh_info0x00000000Additional section information
sh_addralign1Section alignment
sh_entsize1Entry size if section holds table

 

 

vdsp自带的elfdump显示可得到这个section的内容:

---- Section: .annotations [8] ----

 

 Annotations Section .annotations 

 

0x0 (0x0)       ------ Start compilation unit ------

0x39 (0x39)    [msgid=0, flags=info] compilation time: Tue Apr 15 11:28:44 2008

0x25 (0x25)        Position [kind=0] Simple position: line 0, column 0 in file '../../cpu/blackfin/cpu.c'

 

0x 5f (0x 5f )     [msgid=1, flags=info] compiler options: -c -file-attr ProjectName=cpu -g -structs-do-not-overlap -no-multiline -I ../../include -double-size-32 -decls-strong -w -si-revision 0.3 -proc ADSP-BF561 -o ../Debug/cpu/cpu.doj -MM

0x25 (0x25)        Position [kind=0] Simple position: line 0, column 0 in file '../../cpu/blackfin/cpu.c'

 

0x122 (0x122)       [msgid=46, flags=info] requested architecture: ADSP-BF561

0x25 (0x25)        Position [kind=0] Simple position: line 0, column 0 in file '../../cpu/blackfin/cpu.c'

 

0x139 (0x139)       [msgid=45, flags=info] silicon revision: 0.3

0x25 (0x25)        Position [kind=0] Simple position: line 0, column 0 in file '../../cpu/blackfin/cpu.c'

 

0x149 (0x149)       [msgid=59, flags=info] Anomalies summary:

//   Disabled: w05_00_0046,w05_00_0048,w05_00_0054,w05_00_0071,w05_00_0103,w05_00_0104,w05_00_0157,w05_00_0164,w05_00_0165,w05_00_0195,w05_00_0246,wF3_F_021,wF3_F_008_F3_F_013,w05_00_0311

//   Enabled: w05_00_0120,w05_00_0127,w05_00_0189,w05_00_0198,w05_00_0202,w05_00_0209,w05_00_0227,w05_00_0244,w05_00_0245,w05_00_0248,w05_00_0257,w05_00_0262,w05_00_0264,w05_00_0283,w05_00_0312

//   Always on: w05_00_0074,w05_00_0122

0x25 (0x25)        Position [kind=0] Simple position: line 0, column 0 in file '../../cpu/blackfin/cpu.c'

 

0x 32a (0x 32a ) [msgid=48, flags=info] Frame size = 0

0x316 (0x316)           Position [kind=0] Simple position: line 118, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x33b (0x33b)       [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,P1}

0x316 (0x316)           Position [kind=0] Simple position: line 118, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x356 (0x356)       [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x316 (0x316)           Position [kind=0] Simple position: line 118, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x 39c (0x 39c )       [msgid=48, flags=info] Frame size = 0

0x388 (0x388)           Position [kind=0] Simple position: line 68, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x3ad (0x3ad) [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,R1.L,R1.H,P1,ASTAT0-ASTAT1}

0x388 (0x388)           Position [kind=0] Simple position: line 68, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x3e0 (0x3e0) [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x388 (0x388)           Position [kind=0] Simple position: line 68, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x426 (0x426)       [msgid=48, flags=info] Frame size = 0

0x412 (0x412)           Position [kind=0] Simple position: line 51, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x437 (0x437)       [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,R1.L,R1.H,P1,ASTAT0-ASTAT1}

0x412 (0x412)           Position [kind=0] Simple position: line 51, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x 46a (0x 46a ) [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x412 (0x412)           Position [kind=0] Simple position: line 51, column 5 in file '../../cpu/blackfin/cpu.c'

 

0x4ba (0x4ba) [msgid=48, flags=info] Frame size = 0

0x 4a 6 (0x 4a 6)     Position [kind=0] Simple position: line 169, column 20 in file '../../include/asm/blackfin_local.h'

 

0x4cb (0x4cb)       [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H}

0x 4a 6 (0x 4a 6)     Position [kind=0] Simple position: line 169, column 20 in file '../../include/asm/blackfin_local.h'

 

0x4e3 (0x4e3) [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x 4a 6 (0x 4a 6)     Position [kind=0] Simple position: line 169, column 20 in file '../../include/asm/blackfin_local.h'

 

0x533 (0x533)       [msgid=48, flags=info] Frame size = 0

0x 51f (0x 51f )     Position [kind=0] Simple position: line 145, column 20 in file '../../include/asm/blackfin_local.h'

 

0x544 (0x544)       [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H}

0x 51f (0x 51f )     Position [kind=0] Simple position: line 145, column 20 in file '../../include/asm/blackfin_local.h'

 

0x 55c (0x 55c )       [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x 51f (0x 51f )     Position [kind=0] Simple position: line 145, column 20 in file '../../include/asm/blackfin_local.h'

 

0x 5a 2 (0x 5a 2) [msgid=48, flags=info] Frame size = 12

0x58e (0x58e)     Position [kind=0] Simple position: line 39, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x5b3 (0x5b3)       [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,R1.L,R1.H,P1,ASTAT0-ASTAT1}

0x58e (0x58e)     Position [kind=0] Simple position: line 39, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x5e6 (0x5e6) [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x58e (0x58e)     Position [kind=0] Simple position: line 39, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x5ff (0x5ff)  [msgid=54, flags=info] Registers that could be clobbered by function calls: {R0.L,R0.H,R1.L,R1.H,R2.L,R2.H,R3.L,R3.H,P0-P2,I0-I3,B0-B3,M0-M3,A0.W,A0.X,A1.W,A1.X,ASTAT0-ASTAT1,CC,AQ,LC0-LC1,LT0-LT1,LB0-LB1,RETS,SEQSTAT,SYSCFG,USP}

0x58e (0x58e)     Position [kind=0] Simple position: line 39, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x6d2 (0x6d2)       [msgid=48, flags=info] Frame size = 12

0x6be (0x6be)     Position [kind=0] Simple position: line 45, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x6e3 (0x6e3) [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,R1.L,R1.H,P1,ASTAT0-ASTAT1}

0x6be (0x6be)     Position [kind=0] Simple position: line 45, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x716 (0x716)       [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x6be (0x6be)     Position [kind=0] Simple position: line 45, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x 72f (0x 72f ) [msgid=54, flags=info] Registers that could be clobbered by function calls: {R0.L,R0.H,R1.L,R1.H,R2.L,R2.H,R3.L,R3.H,P0-P2,I0-I3,B0-B3,M0-M3,A0.W,A0.X,A1.W,A1.X,ASTAT0-ASTAT1,CC,AQ,LC0-LC1,LT0-LT1,LB0-LB1,RETS,SEQSTAT,SYSCFG,USP}

0x6be (0x6be)     Position [kind=0] Simple position: line 45, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x802 (0x802)       [msgid=48, flags=info] Frame size = 12

0x7ee (0x7ee)     Position [kind=0] Simple position: line 56, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x813 (0x813)       [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,R1.L,R1.H,P1,ASTAT0-ASTAT1}

0x7ee (0x7ee)     Position [kind=0] Simple position: line 56, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x846 (0x846)       [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x7ee (0x7ee)     Position [kind=0] Simple position: line 56, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x 85f (0x 85f ) [msgid=54, flags=info] Registers that could be clobbered by function calls: {R0.L,R0.H,R1.L,R1.H,R2.L,R2.H,R3.L,R3.H,P0-P2,I0-I3,B0-B3,M0-M3,A0.W,A0.X,A1.W,A1.X,ASTAT0-ASTAT1,CC,AQ,LC0-LC1,LT0-LT1,LB0-LB1,RETS,SEQSTAT,SYSCFG,USP}

0x7ee (0x7ee)     Position [kind=0] Simple position: line 56, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x932 (0x932)       [msgid=48, flags=info] Frame size = 12

0x91e (0x91e)     Position [kind=0] Simple position: line 62, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x943 (0x943)       [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,R1.L,R1.H,P1,ASTAT0-ASTAT1}

0x91e (0x91e)     Position [kind=0] Simple position: line 62, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x976 (0x976)       [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS}

0x91e (0x91e)     Position [kind=0] Simple position: line 62, column 6 in file '../../cpu/blackfin/cpu.c'

 

0x 98f (0x 98f ) [msgid=54, flags=info] Registers that could be clobbered by function calls: {R0.L,R0.H,R1.L,R1.H,R2.L,R2.H,R3.L,R3.H,P0-P2,I0-I3,B0-B3,M0-M3,A0.W,A0.X,A1.W,A1.X,ASTAT0-ASTAT1,CC,AQ,LC0-LC1,LT0-LT1,LB0-LB1,RETS,SEQSTAT,SYSCFG,USP}

0x91e (0x91e)     Position [kind=0] Simple position: line 62, column 6 in file '../../cpu/blackfin/cpu.c'

 

0xa62 (0xa62) [msgid=48, flags=info] Frame size = 36

0xa4e (0xa4e)     Position [kind=0] Simple position: line 74, column 6 in file '../../cpu/blackfin/cpu.c'

 

0xa73 (0xa73) [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,R1.L,R1.H,R2.L,R2.H,P1,ASTAT0-ASTAT1,CC}

0xa4e (0xa4e)     Position [kind=0] Simple position: line 74, column 6 in file '../../cpu/blackfin/cpu.c'

 

0xab3 (0xab3) [msgid=53, flags=info] Call preserved registers used: {R7.L,R7.H,FP,SP,RETS}

0xa4e (0xa4e)     Position [kind=0] Simple position: line 74, column 6 in file '../../cpu/blackfin/cpu.c'

 

0xad6 (0xad6) [msgid=54, flags=info] Registers that could be clobbered by function calls: {R0.L,R0.H,R1.L,R1.H,R2.L,R2.H,R3.L,R3.H,P0-P2,I0-I3,B0-B3,M0-M3,A0.W,A0.X,A1.W,A1.X,ASTAT0-ASTAT1,CC,AQ,LC0-LC1,LT0-LT1,LB0-LB1,RETS,SEQSTAT,SYSCFG,USP}

0xa4e (0xa4e)     Position [kind=0] Simple position: line 74, column 6 in file '../../cpu/blackfin/cpu.c'

 

0xba9 (0xba9) [msgid=48, flags=info] Frame size = 16

0xb95 (0xb95)           Position [kind=0] Simple position: line 124, column 5 in file '../../cpu/blackfin/cpu.c'

 

0xbba (0xbba) [msgid=52, flags=info] Scratch registers used: {R0.L,R0.H,P1}

0xb95 (0xb95)           Position [kind=0] Simple position: line 124, column 5 in file '../../cpu/blackfin/cpu.c'

 

0xbd5 (0xbd5)       [msgid=53, flags=info] Call preserved registers used: {R7.L,R7.H,FP,SP,RETS}

0xb95 (0xb95)           Position [kind=0] Simple position: line 124, column 5 in file '../../cpu/blackfin/cpu.c'

 

0xbf8 (0xbf8) [msgid=54, flags=info] Registers that could be clobbered by function calls: {R0.L,R0.H,R1.L,R1.H,R2.L,R2.H,R3.L,R3.H,P0-P2,I0-I3,B0-B3,M0-M3,A0.W,A0.X,A1.W,A1.X,ASTAT0-ASTAT1,CC,AQ,LC0-LC1,LT0-LT1,LB0-LB1,RETS,SEQSTAT,SYSCFG,USP}

0xb95 (0xb95)           Position [kind=0] Simple position: line 124, column 5 in file '../../cpu/blackfin/cpu.c'

每一个annotation的前面都指明了这个annotation的数据在section数据中的偏移量,对照这些偏移量将section的数据做个划分:

table 001234567890a0b0c0d0e0f字符串值
0x000000001000a00c00390002e2e5c2e........9...../.
0x000000102e5c6370755c626c61636b66696e5c63./cpu/blackfin/c
0x0000002070752e6300c0000000000pu.c............
0x000000300000000005f0002500........._...%..
0x00000040000005475652041707220313520.....Tue Apr 15
0x0000005031313a32383a343420323030380a02211:28:44 2008.."
0x000000601002500010002d63202d66...%.......-c -f
0x00000070696c652d617474722050726f6a656374ile-attr Project
0x000000804e616d653d637075202d67202d737472Name=cpu -g -str
0x00000090756374732d646f2d6e6f742d6f766572ucts-do-not-over
0x000000a06c6170202d6e6f2d6d756c74696c696elap -no-multilin
0x000000b065202d49202e2e5c2e2e5c696e636c75e -I ../../inclu
0x000000c06465202d646f75626c652d73697a652dde -double-size-
0x000000d03332202d6465636c732d7374726f6e6732 -decls-strong
0x000000e0202d77202d73692d7265766973696f6e-w -si-revision
0x000000f020302e33202d70726f6320414453502d0.3 -proc ADSP-
0x000001004246353631202d6f202e2e5c44656275BF561 -o ../Debu
0x00000110675c6370755c6370752e646f6a202d4dg/cpu/cpu.doj -M
0x000001204d0039010000250000002e0000004144M.9...%.......AD
0x0000013053502d42463536310049010000250000SP-BF561.I...%..
0x00000140002d000000302e33002a030000250000.-...0.3.*...%..
0x00000150003b0000000a2f2f2020204469736162.;....// Disab
0x000001606c65643a207730355f30305f30303436led: w05_00_0046
0x000001702c7730355f30305f303034382c773035,w05_00_0048,w05
0x000001805f30305f303035342c7730355f30305f_00_0054,w05_00_
0x00000190303037312c7730355f30305f303130330071,w05_00_0103
0x000001a02c7730355f30305f303130342c773035,w05_00_0104,w05
0x000001b05f30305f303135372c7730355f30305f_00_0157,w05_00_
0x000001c0303136342c7730355f30305f303136350164,w05_00_0165
0x000001d02c7730355f30305f303139352c773035,w05_00_0195,w05
0x000001e05f30305f303234362c7746335f465f30_00_0246,wF3_F_0
0x000001f032312c7746335f465f3030385f46335f21,wF3_F_008_F3_
0x00000200465f3031332c7730355f30305f303331F_013,w05_00_031
0x00000210310a2f2f202020456e61626c65643a201.// Enabled:
0x000002207730355f30305f303132302c7730355fw05_00_0120,w05_
0x0000023030305f303132372c7730355f30305f3000_0127,w05_00_0
0x000002403138392c7730355f30305f303139382c189,w05_00_0198,
0x000002507730355f30305f303230322c7730355fw05_00_0202,w05_
0x0000026030305f303230392c7730355f30305f3000_0209,w05_00_0
0x000002703232372c7730355f30305f303234342c227,w05_00_0244,
0x000002807730355f30305f303234352c7730355fw05_00_0245,w05_
0x0000029030305f303234382c7730355f30305f3000_0248,w05_00_0
0x000002a03235372c7730355f30305f303236322c257,w05_00_0262,
0x000002b07730355f30305f303236342c7730355fw05_00_0264,w05_
0x000002c030305f303238332c7730355f30305f3000_0283,w05_00_0
0x000002d03331320a2f2f202020416c7761797320312.// Always
0x000002e06f6e3a207730355f30305f303037342con: w05_00_0074,
0x000002f07730355f30305f303132320a002e2e5cw05_00_0122..../
0x000003002e2e5c6370755c626c61636b66696e5c../cpu/blackfin/
0x000003106370752e6300fd020000760000000500cpu.c.....v.....
0x00000320000000000000000000003b0300001603..........;.....
0x0000033000003000000000000000005603000016..0........V....
0x00000340030000340000007b52302e4c2c52302e...4...{R0.L,R0.
0x00000350482c50317d009c030000160300003500H,P1}.........5.
0x0000036000007b46502c53502c524554537d002e..{FP,SP,RETS}..
0x000003702e5c2e2e5c6370755c626c61636b6669./../cpu/blackfi
0x000003806e5c6370752e63006f03000044000000n/cpu.c.o...D...
0x00000390050000000000000000000000ad030000................
0x000003a088030000300000000000000000e00300....0...........
0x000003b00088030000340000007b52302e4c2c52.....4...{R0.L,R
0x000003c0302e482c52312e4c2c52312e482c50310.H,R1.L,R1.H,P1
0x000003d02c4153544154302d4153544154317d00,ASTAT0-ASTAT1}.
0x000003e02604000088030000350000007b46502c&.......5...{FP,
0x000003f053502c524554537d002e2e5c2e2e5c63SP,RETS}.../../c
0x0000040070755c626c61636b66696e5c6370752epu/blackfin/cpu.
0x000004106300f903000033000000050000000000c.....3.........
0x0000042000000000000037040000120400003000......7.......0.
0x00000430000000000000006a0400001204000034.......j.......4
0x000004400000007b52302e4c2c52302e482c5231...{R0.L,R0.H,R1
0x000004502e4c2c52312e482c50312c4153544154.L,R1.H,P1,ASTAT
0x00000460302d4153544154317d00ba04000012040-ASTAT1}.......
0x000004700000350000007b46502c53502c524554..5...{FP,SP,RET
0x00000480537d002e2e5c2e2e5c696e636c756465S}.../../include
0x000004905c61736d5c626c61636b66696e5f6c6f/asm/blackfin_lo
0x000004a063616c2e680083040000a90000001400cal.h...........
0x000004b000000000000000000000cb040000a604................
0x000004c00000300000000000000000e3040000a6..0.............
0x000004d0040000340000007b52302e4c2c52302e...4...{R0.L,R0.
0x000004e0487d0033050000a6040000350000007bH}.3.......5...{
0x000004f046502c53502c524554537d002e2e5c2eFP,SP,RETS}.../.
0x000005002e5c696e636c7564655c61736d5c626c./include/asm/bl
0x0000051061636b66696e5f6c6f63616c2e6800fcackfin_local.h..
0x0000052004000091000000140000000000000000................
0x00000530000000440500001f0500003000000000...D.......0....
0x00000540000000005c0500001f05000034000000..../.......4...
0x000005507b52302e4c2c52302e487d00a2050000{R0.L,R0.H}.....
0x000005601f050000350000007b46502c53502c52....5...{FP,SP,R
0x000005704554537d002e2e5c2e2e5c6370755c62ETS}.../../cpu/b
0x000005806c61636b66696e5c6370752e63007505lackfin/cpu.c.u.
0x0000059000002700000006000000000000000000..'.............
0x000005a00000b30500008e050000300000000c00..........0.....
0x000005b0000000e60500008e050000340000007b...........4...{
0x000005c052302e4c2c52302e482c52312e4c2c52R0.L,R0.H,R1.L,R
0x000005d0312e482c50312c4153544154302d41531.H,P1,ASTAT0-AS
0x000005e0544154317d00ff0500008e0500003500TAT1}.........5.
0x000005f000007b46502c53502c524554537d00d2..{FP,SP,RETS}..
0x000006000600008e050000360000007b52302e4c.......6...{R0.L
0x000006102c52302e482c52312e4c2c52312e482c,R0.H,R1.L,R1.H,
0x0000062052322e4c2c52322e482c52332e4c2c52R2.L,R2.H,R3.L,R
0x00000630332e482c50302d50322c49302d49332c3.H,P0-P2,I0-I3,
0x0000064042302d42332c4d302d4d332c41302e57B0-B3,M0-M3,A0.W
0x000006502c41302e582c41312e572c41312e582c,A0.X,A1.W,A1.X,
0x000006604153544154302d4153544154312c4343ASTAT0-ASTAT1,CC
0x000006702c41512c4c43302d4c43312c4c54302d,AQ,LC0-LC1,LT0-
0x000006804c54312c4c42302d4c42312c52455453LT1,LB0-LB1,RETS
0x000006902c534551535441542c5359534346472c,SEQSTAT,SYSCFG,
0x000006a05553507d002e2e5c2e2e5c6370755c62USP}.../../cpu/b
0x000006b06c61636b66696e5c6370752e6300a506lackfin/cpu.c...
0x000006c000002d00000006000000000000000000..-.............
0x000006d00000e3060000be060000300000000c00..........0.....
0x000006e000000016070000be060000340000007b...........4...{
0x000006f052302e4c2c52302e482c52312e4c2c52R0.L,R0.H,R1.L,R
0x00000700312e482c50312c4153544154302d41531.H,P1,ASTAT0-AS
0x00000710544154317d002f070000be0600003500TAT1}./.......5.
0x0000072000007b46502c53502c524554537d0002..{FP,SP,RETS}..
0x00000730080000be060000360000007b52302e4c.......6...{R0.L
0x000007402c52302e482c52312e4c2c52312e482c,R0.H,R1.L,R1.H,
0x0000075052322e4c2c52322e482c52332e4c2c52R2.L,R2.H,R3.L,R
0x00000760332e482c50302d50322c49302d49332c3.H,P0-P2,I0-I3,
0x0000077042302d42332c4d302d4d332c41302e57B0-B3,M0-M3,A0.W
0x000007802c41302e582c41312e572c41312e582c,A0.X,A1.W,A1.X,
0x000007904153544154302d4153544154312c4343ASTAT0-ASTAT1,CC
0x000007a02c41512c4c43302d4c43312c4c54302d,AQ,LC0-LC1,LT0-
0x000007b04c54312c4c42302d4c42312c52455453LT1,LB0-LB1,RETS
0x000007c02c534551535441542c5359534346472c,SEQSTAT,SYSCFG,
0x000007d05553507d002e2e5c2e2e5c6370755c62USP}.../../cpu/b
0x000007e06c61636b66696e5c6370752e6300d507lackfin/cpu.c...
0x000007f000003800000006000000000000000000..8.............
0x00000800000013080000ee070000300000000c00..........0.....
0x0000081000000046080000ee070000340000007b...F.......4...{
0x0000082052302e4c2c52302e482c52312e4c2c52R0.L,R0.H,R1.L,R
0x00000830312e482c50312c4153544154302d41531.H,P1,ASTAT0-AS
0x00000840544154317d005f080000ee0700003500TAT1}._.......5.
0x0000085000007b46502c53502c524554537d0032..{FP,SP,RETS}.2
0x00000860090000ee070000360000007b52302e4c.......6...{R0.L
0x000008702c52302e482c52312e4c2c52312e482c,R0.H,R1.L,R1.H,
0x0000088052322e4c2c52322e482c52332e4c2c52R2.L,R2.H,R3.L,R
0x00000890332e482c50302d50322c49302d49332c3.H,P0-P2,I0-I3,
0x000008a042302d42332c4d302d4d332c41302e57B0-B3,M0-M3,A0.W
0x000008b02c41302e582c41312e572c41312e582c,A0.X,A1.W,A1.X,
0x000008c04153544154302d4153544154312c4343ASTAT0-ASTAT1,CC
0x000008d02c41512c4c43302d4c43312c4c54302d,AQ,LC0-LC1,LT0-
0x000008e04c54312c4c42302d4c42312c52455453LT1,LB0-LB1,RETS
0x000008f02c534551535441542c5359534346472c,SEQSTAT,SYSCFG,
0x000009005553507d002e2e5c2e2e5c6370755c62USP}.../../cpu/b
0x000009106c61636b66696e5c6370752e63000509lackfin/cpu.c...
0x0000092000003e00000006000000000000000000..>.............
0x000009300000430900001e090000300000000c00..C.......0.....
0x00000940000000760900001e090000340000007b...v.......4...{
0x0000095052302e4c2c52302e482c52312e4c2c52R0.L,R0.H,R1.L,R
0x00000960312e482c50312c4153544154302d41531.H,P1,ASTAT0-AS
0x00000970544154317d008f0900001e0900003500TAT1}.........5.
0x0000098000007b46502c53502c524554537d0062..{FP,SP,RETS}.b
0x000009900a00001e090000360000007b52302e4c.......6...{R0.L
0x000009a02c52302e482c52312e4c2c52312e482c,R0.H,R1.L,R1.H,
0x000009b052322e4c2c52322e482c52332e4c2c52R2.L,R2.H,R3.L,R
0x000009c0332e482c50302d50322c49302d49332c3.H,P0-P2,I0-I3,
0x000009d042302d42332c4d302d4d332c41302e57B0-B3,M0-M3,A0.W
0x000009e02c41302e582c41312e572c41312e582c,A0.X,A1.W,A1.X,
0x000009f04153544154302d4153544154312c4343ASTAT0-ASTAT1,CC
0x00000a002c41512c4c43302d4c43312c4c54302d,AQ,LC0-LC1,LT0-
0x00000a104c54312c4c42302d4c42312c52455453LT1,LB0-LB1,RETS
0x00000a202c534551535441542c5359534346472c,SEQSTAT,SYSCFG,
0x00000a305553507d002e2e5c2e2e5c6370755c62USP}.../../cpu/b
0x00000a406c61636b66696e5c6370752e6300350alackfin/cpu.c.5.
0x00000a5000004a00000006000000000000000000..J.............
0x00000a600000730a00004e0a0000300000002400..s...N...0...$.
0x00000a70000000b30a00004e0a0000340000007b.......N...4...{
0x00000a8052302e4c2c52302e482c52312e4c2c52R0.L,R0.H,R1.L,R
0x00000a90312e482c52322e4c2c52322e482c50311.H,R2.L,R2.H,P1
0x00000aa02c4153544154302d4153544154312c43,ASTAT0-ASTAT1,C
0x00000ab0437d00d60a00004e0a0000350000007bC}.....N...5...{
0x00000ac052372e4c2c52372e482c46502c53502cR7.L,R7.H,FP,SP,
0x00000ad0524554537d00a90b00004e0a00003600RETS}.....N...6.
0x00000ae000007b52302e4c2c52302e482c52312e..{R0.L,R0.H,R1.
0x00000af04c2c52312e482c52322e4c2c52322e48L,R1.H,R2.L,R2.H
0x00000b002c52332e4c2c52332e482c50302d5032,R3.L,R3.H,P0-P2
0x00000b102c49302d49332c42302d42332c4d302d,I0-I3,B0-B3,M0-
0x00000b204d332c41302e572c41302e582c41312eM3,A0.W,A0.X,A1.
0x00000b30572c41312e582c4153544154302d4153W,A1.X,ASTAT0-AS
0x00000b40544154312c43432c41512c4c43302d4cTAT1,CC,AQ,LC0-L
0x00000b5043312c4c54302d4c54312c4c42302d4cC1,LT0-LT1,LB0-L
0x00000b6042312c524554532c534551535441542cB1,RETS,SEQSTAT,
0x00000b705359534346472c5553507d002e2e5c2eSYSCFG,USP}.../.
0x00000b802e5c6370755c626c61636b66696e5c63./cpu/blackfin/c
0x00000b9070752e63007c0b00007c000000050000pu.c.|...|......
0x00000ba0000000000000000000ba0b0000950b00................
0x00000bb000300000001000000000d50b0000950b.0..............
0x00000bc00000340000007b52302e4c2c52302e48..4...{R0.L,R0.H
0x00000bd02c50317d00f80b0000950b0000350000,P1}.........5..
0x00000be0007b52372e4c2c52372e482c46502c53.{R7.L,R7.H,FP,S
0x00000bf0502c524554537d0000000000950b0000P,RETS}.........
0x00000c00360000007b52302e4c2c52302e482c526...{R0.L,R0.H,R
0x00000c10312e4c2c52312e482c52322e4c2c52321.L,R1.H,R2.L,R2
0x00000c202e482c52332e4c2c52332e482c50302d.H,R3.L,R3.H,P0-
0x00000c3050322c49302d49332c42302d42332c4dP2,I0-I3,B0-B3,M
0x00000c40302d4d332c41302e572c41302e582c410-M3,A0.W,A0.X,A
0x00000c50312e572c41312e582c4153544154302d1.W,A1.X,ASTAT0-
0x00000c604153544154312c43432c41512c4c4330ASTAT1,CC,AQ,LC0
0x00000c702d4c43312c4c54302d4c54312c4c4230-LC1,LT0-LT1,LB0
0x00000c802d4c42312c524554532c534551535441-LB1,RETS,SEQSTA
0x00000c90542c5359534346472c5553507d000000T,SYSCFG,USP}...
        Item Link       
        Message Id      
        指明在此之后的Item适用的文件名及其偏移量
        文件中的行号和列号    

 

 

上图中的红色部分标明了每个annotation的起始位置,可以明显地看出在每个annotation的开头用4个字节保存了下一个annotation在段数据中的偏移量。

再观察msgid,很容易在每个annotation的第8个字节处发现它们的踪迹,即用黄色标出的部分。

观察红色和黄色之间的4个字节,很容易可以猜测到这个整数表示了一个段中的偏移量,看看它指向哪里?观察这个偏移量所指向的位置的数据,可以猜到这又是一个偏移量,跟着这个偏移量走,可以发现一个字符串“../../cpu/blackfin/cpu.c”,而第二个偏移量就紧跟在这个字符串的后面。在上表中用浅橙色标出了这个字符串和跟在它后面的偏移量。这个字符串在elfdump显示出来就是:

0xb95 (0xb95)           Position [kind=0] Simple position: line 124, column 5 in file '../../cpu/blackfin/cpu.c'

在这行显示中,同时还显示了linecolumn的值,这两个值很容易可以在字符串数据之后找到,也就是上表中用淡蓝色标出的部分。

至于每个annotation的具体内容,则必须根据msgid进行解释,往往都是一个字符串。

 

 

参考资料

vdsp(bf561)中自定义StackHeap( 2007/11/9 )

VDSP.doj文件到uClinx.O文件的转换 2007/12/17

VDSP函数调用时的参数传递 2008/1/2

VDSP中使用FP取得函数的调用堆栈 2008/1/2

vdsp4.5(bf561)中的CPLB 2008/2/18

Bf533 Ldr文件到DXE文件的转换-jack 2008/3/10

说说VDSP5( 2008/7/18 )

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嵌云阁主

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值