DSP

doj文件中的.annotation段

2019-07-13 12:50发布

  快乐虾 http://blog.csdn.net/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_name 1578 Section name, index in string tbl sh_type FINI_ARRAY Type of section sh_flags 0x00020000 Miscellaneous section attributes sh_addr 0x00000000 Section virtual addr at execution sh_offset 16399 Section file offset sh_size 3232 Size of section in bytes sh_link 0 Index of another section sh_info 0x00000000 Additional section information sh_addralign 1 Section alignment sh_entsize 1 Entry 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'   0x5f (0x5f)     [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'   0x32a (0x32a) [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'   0x39c (0x39c)       [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'   0x46a (0x46a) [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 0x4a6 (0x4a6)     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} 0x4a6 (0x4a6)     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} 0x4a6 (0x4a6)     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 0x51f (0x51f)     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} 0x51f (0x51f)     Position [kind=0] Simple position: line 145, column 20 in file '../../include/asm/blackfin_local.h'   0x55c (0x55c)       [msgid=53, flags=info] Call preserved registers used: {FP,SP,RETS} 0x51f (0x51f)     Position [kind=0] Simple position: line 145, column 20 in file '../../include/asm/blackfin_local.h'   0x5a2 (0x5a2) [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'   0x72f (0x72f) [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'   0x85f (0x85f) [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'   0x98f (0x98f) [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 0 0 1 2 3 4 5 6 7 8 9 0a 0b 0c 0d 0e 0f 字符串值 0x00000000 1 0 0 0 a0 0c 0 0 39 0 0 0 2e 2e 5c 2e ........9...../. 0x00000010 2e 5c 63 70 75 5c 62 6c 61 63 6b 66 69 6e 5c 63 ./cpu/blackfin/c 0x00000020 70 75 2e 63 0 0c 0 0 0 0 0 0 0 0 0 0 pu.c............ 0x00000030 0 0 0 0 0 0 0 0 0 5f 0 0 0 25 0 0 ........._...%.. 0x00000040 0 0 0 0 0 54 75 65 20 41 70 72 20 31 35 20 .....Tue Apr 15 0x00000050 31 31 3a 32 38 3a 34 34 20 32 30 30 38 0a 0 22 11:28:44 2008.." 0x00000060 1 0 0 25 0 0 0 1 0 0 0 2d 63 20 2d 66 ...%.......-c -f 0x00000070 69 6c 65 2d 61 74 74 72 20 50 72 6f 6a 65 63 74 ile-attr Project 0x00000080 4e 61 6d 65 3d 63 70 75 20 2d 67 20 2d 73 74 72 Name=cpu -g -str 0x00000090 75 63 74 73 2d 64 6f 2d 6e 6f 74 2d 6f 76 65 72 ucts-do-not-over 0x000000a0 6c 61 70 20 2d 6e 6f 2d 6d 75 6c 74 69 6c 69 6e lap -no-multilin 0x000000b0 65 20 2d 49 20 2e 2e 5c 2e 2e 5c 69 6e 63 6c 75 e -I ../../inclu 0x000000c0 64 65 20 2d 64 6f 75 62 6c 65 2d 73 69 7a 65 2d de -double-size- 0x000000d0 33 32 20 2d 64 65 63 6c 73 2d 73 74 72 6f 6e 67 32 -decls-strong 0x000000e0 20 2d 77 20 2d 73 69 2d 72 65 76 69 73 69 6f 6e -w -si-revision 0x000000f0 20 30 2e 33 20 2d 70 72 6f 63 20 41 44 53 50 2d 0.3 -proc ADSP- 0x00000100 42 46 35 36 31 20 2d 6f 20 2e 2e 5c 44 65 62 75 BF561 -o ../Debu 0x00000110 67 5c 63 70 75 5c 63 70 75 2e 64 6f 6a 20 2d 4d g/cpu/cpu.doj -M 0x00000120 4d 00 39 01 00 00 25 00 00 00 2e 00 00 00 41 44 M.9...%.......AD 0x00000130 53 50 2d 42 46 35 36 31 00 49 01 00 00 25 00 00 SP-BF561.I...%.. 0x00000140 00 2d 00 00 00 30 2e 33 00 2a 03 00 00 25 00 00 .-...0.3.*...%.. 0x00000150 00 3b 00 00 00 0a 2f 2f 20 20 20 44 69 73 61 62 .;....// Disab 0x00000160 6c 65 64 3a 20 77 30 35 5f 30 30 5f 30 30 34 36 led: w05_00_0046 0x00000170 2c 77 30 35 5f 30 30 5f 30 30 34 38 2c 77 30 35 ,w05_00_0048,w05 0x00000180 5f 30 30 5f 30 30 35 34 2c 77 30 35 5f 30 30 5f _00_0054,w05_00_ 0x00000190 30 30 37 31 2c 77 30 35 5f 30 30 5f 30 31 30 33 0071,w05_00_0103 0x000001a0 2c 77 30 35 5f 30 30 5f 30 31 30 34 2c 77 30 35 ,w05_00_0104,w05 0x000001b0 5f 30 30 5f 30 31 35 37 2c 77 30 35 5f 30 30 5f _00_0157,w05_00_ 0x000001c0 30 31 36 34 2c 77 30 35 5f 30 30 5f 30 31 36 35 0164,w05_00_0165 0x000001d0 2c 77 30 35 5f 30 30 5f 30 31 39 35 2c 77 30 35 ,w05_00_0195,w05 0x000001e0 5f 30 30 5f 30 32 34 36 2c 77 46 33 5f 46 5f 30 _00_0246,wF3_F_0 0x000001f0 32 31 2c 77 46 33 5f 46 5f 30 30 38 5f 46 33 5f 21,wF3_F_008_F3_ 0x00000200 46 5f 30 31 33 2c 77 30 35 5f 30 30 5f 30 33 31 F_013,w05_00_031 0x00000210 31 0a 2f 2f 20 20 20 45 6e 61 62 6c 65 64 3a 20 1.// Enabled: 0x00000220 77 30 35 5f 30 30 5f 30 31 32 30 2c 77 30 35 5f w05_00_0120,w05_ 0x00000230 30 30 5f 30 31 32 37 2c 77 30 35 5f 30 30 5f 30 00_0127,w05_00_0 0x00000240 31 38 39 2c 77 30 35 5f 30 30 5f 30 31 39 38 2c 189,w05_00_0198, 0x00000250 77 30 35 5f 30 30 5f 30 32 30 32 2c 77 30 35 5f w05_00_0202,w05_ 0x00000260 30 30 5f 30 32 30 39 2c 77 30 35 5f 30 30 5f 30 00_0209,w05_00_0 0x00000270 32 32 37 2c 77 30 35 5f 30 30 5f 30 32 34 34 2c 227,w05_00_0244, 0x00000280 77 30 35 5f 30 30 5f 30 32 34 35 2c 77 30 35 5f w05_00_0245,w05_ 0x00000290 30 30 5f 30 32 34 38 2c 77 30 35 5f 30 30 5f 30 00_0248,w05_00_0 0x000002a0 32 35 37 2c 77 30 35 5f 30 30 5f 30 32 36 32 2c 257,w05_00_0262, 0x000002b0 77 30 35 5f 30 30 5f 30 32 36 34 2c 77 30 35 5f w05_00_0264,w05_ 0x000002c0 30 30 5f 30 32 38 33 2c 77 30 35 5f 30 30 5f 30 00_0283,w05_00_0 0x000002d0 33 31 32 0a 2f 2f 20 20 20 41 6c 77 61 79 73 20 312.// Always 0x000002e0 6f 6e 3a 20 77 30 35 5f 30 30 5f 30 30 37 34 2c on: w05_00_0074, 0x000002f0 77 30 35 5f 30 30 5f 30 31 32 32 0a 00 2e 2e 5c w05_00_0122..../ 0x00000300 2e 2e 5c 63 70 75 5c 62 6c 61 63 6b 66 69 6e 5c ../cpu/blackfin/ 0x00000310 63 70 75 2e 63 00 fd 02 00 00 76 00 00 00 05 00 cpu.c.....v..... 0x00000320 00 00 00 00 00 00 00 00 00 00 3b 03 00 00 16 03 ..........;..... 0x00000330 00 00 30 00 00 00 00 00 00 00 00 56 03 00 00 16 ..0........V.... 0x00000340 03 00 00 34 00 00 00 7b 52 30 2e 4c 2c 52 30 2e ...4...{R0.L,R0. 0x00000350 48 2c 50 31 7d 00 9c 03 00 00 16 03 00 00 35 00 H,P1}.........5. 0x00000360 00 00 7b 46 50 2c 53 50 2c 52 45 54 53 7d 00 2e ..{FP,SP,RETS}.. 0x00000370 2e 5c 2e 2e 5c 63 70 75 5c 62 6c 61 63 6b 66 69 ./../cpu/blackfi 0x00000380 6e 5c 63 70 75 2e 63 00 6f 03 00 00 44 00 00 00 n/cpu.c.o...D... 0x00000390 05 00 00 00 00 00 00 00 00 00 00 00 ad 03 00 00 ................ 0x000003a0 88 03 00 00 30 00 00 00 00 00 00 00 00 e0 03 00 ....0........... 0x000003b0 00 88 03 00 00 34 00 00 00 7b 52 30 2e 4c 2c 52 .....4...{R0.L,R 0x000003c0 30 2e 48 2c 52 31 2e 4c 2c 52 31 2e 48 2c 50 31 0.H,R1.L,R1.H,P1 0x000003d0 2c 41 53 54 41 54 30 2d 41 53 54 41 54 31 7d 00 ,ASTAT0-ASTAT1}. 0x000003e0 26 04 00 00 88 03 00 00 35 00 00 00 7b 46 50 2c &.......5...{FP, 0x000003f0 53 50 2c 52 45 54 53 7d 00 2e 2e 5c 2e 2e 5c 63 SP,RETS}.../../c 0x00000400 70 75 5c 62 6c 61 63 6b 66 69 6e 5c 63 70 75 2e pu/blackfin/cpu. 0x00000410 63 00 f9 03 00 00 33 00 00 00 05 00 00 00 00 00 c.....3......... 0x00000420 00 00 00 00 00 00 37 04 00 00 12 04 00 00 30 00 ......7.......0. 0x00000430 00 00 00 00 00 00 00 6a 04 00 00 12 04 00 00 34 .......j.......4 0x00000440 00 00 00 7b 52 30 2e 4c 2c 52 30 2e 48 2c 52 31 ...{R0.L,R0.H,R1 0x00000450 2e 4c 2c 52 31 2e 48 2c 50 31 2c 41 53 54 41 54 .L,R1.H,P1,ASTAT 0x00000460 30 2d 41 53 54 41 54 31 7d 00 ba 04 00 00 12 04 0-ASTAT1}....... 0x00000470 00 00 35 00 00 00 7b 46 50 2c 53 50 2c 52 45 54 ..5...{FP,SP,RET 0x00000480 53 7d 00 2e 2e 5c 2e 2e 5c 69 6e 63 6c 75 64 65 S}.../../include 0x00000490 5c 61 73 6d 5c 62 6c 61 63 6b 66 69 6e 5f 6c 6f /asm/blackfin_lo 0x000004a0 63 61 6c 2e 68 00 83 04 00 00 a9 00 00 00 14 00 cal.h........... 0x000004b0 00 00 00 00 00 00 00 00 00 00 cb 04 00 00 a6 04 ................ 0x000004c0 00 00 30 00 00 00 00 00 00 00 00 e3 04 00 00 a6 ..0............. 0x000004d0 04 00 00 34 00 00 00 7b 52 30 2e 4c 2c 52 30 2e ...4...{R0.L,R0. 0x000004e0 48 7d 00 33 05 00 00 a6 04 00 00 35 00 00 00 7b H}.3.......5...{ 0x000004f0 46 50 2c 53 50 2c 52 45 54 53 7d 00 2e 2e 5c 2e FP,SP,RETS}.../. 0x00000500 2e 5c 69 6e 63 6c 75 64 65 5c 61 73 6d 5c 62 6c ./include/asm/bl 0x00000510 61 63 6b 66 69 6e 5f 6c 6f 63 61 6c 2e 68 00 fc ackfin_local.h.. 0x00000520 04 00 00 91 00 00 00 14 00 00 00 00 00 00 00 00 ................ 0x00000530 00 00 00 44 05 00 00 1f 05 00 00 30 00 00 00 00 ...D.......0.... 0x00000540 00 00 00 00 5c 05 00 00 1f 05 00 00 34 00 00 00 ..../.......4... 0x00000550 7b 52 30 2e 4c 2c 52 30 2e 48 7d 00 a2 05 00 00 {R0.L,R0.H}..... 0x00000560 1f 05 00 00 35 00 00 00 7b 46 50 2c 53 50 2c 52 ....5...{FP,SP,R 0x00000570 45 54 53 7d 00 2e 2e 5c 2e 2e 5c 63 70 75 5c 62 ETS}.../../cpu/b 0x00000580 6c 61 63 6b 66 69 6e 5c 63 70 75 2e 63 00 75 05 lackfin/cpu.c.u. 0x00000590 00 00 27 00 00 00 06 00 00 00 00 00 00 00 00 00 ..'............. 0x000005a0 00 00 b3 05 00 00 8e 05 00 00 30 00 00 00 0c 00 ..........0..... 0x000005b0 00 00 00 e6 05 00 00 8e 05 00 00 34 00 00 00 7b ...........4...{ 0x000005c0 52 30 2e 4c 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 R0.L,R0.H,R1.L,R 0x000005d0 31 2e 48 2c 50 31 2c 41 53 54 41 54 30 2d 41 53 1.H,P1,ASTAT0-AS 0x000005e0 54 41 54 31 7d 00 ff 05 00 00 8e 05 00 00 35 00 TAT1}.........5. 0x000005f0 00 00 7b 46 50 2c 53 50 2c 52 45 54 53 7d 00 d2 ..{FP,SP,RETS}.. 0x00000600 06 00 00 8e 05 00 00 36 00 00 00 7b 52 30 2e 4c .......6...{R0.L 0x00000610 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 31 2e 48 2c ,R0.H,R1.L,R1.H, 0x00000620 52 32 2e 4c 2c 52 32 2e 48 2c 52 33 2e 4c 2c 52 R2.L,R2.H,R3.L,R 0x00000630 33 2e 48 2c 50 30 2d 50 32 2c 49 30 2d 49 33 2c 3.H,P0-P2,I0-I3, 0x00000640 42 30 2d 42 33 2c 4d 30 2d 4d 33 2c 41 30 2e 57 B0-B3,M0-M3,A0.W 0x00000650 2c 41 30 2e 58 2c 41 31 2e 57 2c 41 31 2e 58 2c ,A0.X,A1.W,A1.X, 0x00000660 41 53 54 41 54 30 2d 41 53 54 41 54 31 2c 43 43 ASTAT0-ASTAT1,CC 0x00000670 2c 41 51 2c 4c 43 30 2d 4c 43 31 2c 4c 54 30 2d ,AQ,LC0-LC1,LT0- 0x00000680 4c 54 31 2c 4c 42 30 2d 4c 42 31 2c 52 45 54 53 LT1,LB0-LB1,RETS 0x00000690 2c 53 45 51 53 54 41 54 2c 53 59 53 43 46 47 2c ,SEQSTAT,SYSCFG, 0x000006a0 55 53 50 7d 00 2e 2e 5c 2e 2e 5c 63 70 75 5c 62 USP}.../../cpu/b 0x000006b0 6c 61 63 6b 66 69 6e 5c 63 70 75 2e 63 00 a5 06 lackfin/cpu.c... 0x000006c0 00 00 2d 00 00 00 06 00 00 00 00 00 00 00 00 00 ..-............. 0x000006d0 00 00 e3 06 00 00 be 06 00 00 30 00 00 00 0c 00 ..........0..... 0x000006e0 00 00 00 16 07 00 00 be 06 00 00 34 00 00 00 7b ...........4...{ 0x000006f0 52 30 2e 4c 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 R0.L,R0.H,R1.L,R 0x00000700 31 2e 48 2c 50 31 2c 41 53 54 41 54 30 2d 41 53 1.H,P1,ASTAT0-AS 0x00000710 54 41 54 31 7d 00 2f 07 00 00 be 06 00 00 35 00 TAT1}./.......5. 0x00000720 00 00 7b 46 50 2c 53 50 2c 52 45 54 53 7d 00 02 ..{FP,SP,RETS}.. 0x00000730 08 00 00 be 06 00 00 36 00 00 00 7b 52 30 2e 4c .......6...{R0.L 0x00000740 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 31 2e 48 2c ,R0.H,R1.L,R1.H, 0x00000750 52 32 2e 4c 2c 52 32 2e 48 2c 52 33 2e 4c 2c 52 R2.L,R2.H,R3.L,R 0x00000760 33 2e 48 2c 50 30 2d 50 32 2c 49 30 2d 49 33 2c 3.H,P0-P2,I0-I3, 0x00000770 42 30 2d 42 33 2c 4d 30 2d 4d 33 2c 41 30 2e 57 B0-B3,M0-M3,A0.W 0x00000780 2c 41 30 2e 58 2c 41 31 2e 57 2c 41 31 2e 58 2c ,A0.X,A1.W,A1.X, 0x00000790 41 53 54 41 54 30 2d 41 53 54 41 54 31 2c 43 43 ASTAT0-ASTAT1,CC 0x000007a0 2c 41 51 2c 4c 43 30 2d 4c 43 31 2c 4c 54 30 2d ,AQ,LC0-LC1,LT0- 0x000007b0 4c 54 31 2c 4c 42 30 2d 4c 42 31 2c 52 45 54 53 LT1,LB0-LB1,RETS 0x000007c0 2c 53 45 51 53 54 41 54 2c 53 59 53 43 46 47 2c ,SEQSTAT,SYSCFG, 0x000007d0 55 53 50 7d 00 2e 2e 5c 2e 2e 5c 63 70 75 5c 62 USP}.../../cpu/b 0x000007e0 6c 61 63 6b 66 69 6e 5c 63 70 75 2e 63 00 d5 07 lackfin/cpu.c... 0x000007f0 00 00 38 00 00 00 06 00 00 00 00 00 00 00 00 00 ..8............. 0x00000800 00 00 13 08 00 00 ee 07 00 00 30 00 00 00 0c 00 ..........0..... 0x00000810 00 00 00 46 08 00 00 ee 07 00 00 34 00 00 00 7b ...F.......4...{ 0x00000820 52 30 2e 4c 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 R0.L,R0.H,R1.L,R 0x00000830 31 2e 48 2c 50 31 2c 41 53 54 41 54 30 2d 41 53 1.H,P1,ASTAT0-AS 0x00000840 54 41 54 31 7d 00 5f 08 00 00 ee 07 00 00 35 00 TAT1}._.......5. 0x00000850 00 00 7b 46 50 2c 53 50 2c 52 45 54 53 7d 00 32 ..{FP,SP,RETS}.2 0x00000860 09 00 00 ee 07 00 00 36 00 00 00 7b 52 30 2e 4c .......6...{R0.L 0x00000870 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 31 2e 48 2c ,R0.H,R1.L,R1.H, 0x00000880 52 32 2e 4c 2c 52 32 2e 48 2c 52 33 2e 4c 2c 52 R2.L,R2.H,R3.L,R 0x00000890 33 2e 48 2c 50 30 2d 50 32 2c 49 30 2d 49 33 2c 3.H,P0-P2,I0-I3, 0x000008a0 42 30 2d 42 33 2c 4d 30 2d 4d 33 2c 41 30 2e 57 B0-B3,M0-M3,A0.W 0x000008b0 2c 41 30 2e 58 2c 41 31 2e 57 2c 41 31 2e 58 2c ,A0.X,A1.W,A1.X, 0x000008c0 41 53 54 41 54 30 2d 41 53 54 41 54 31 2c 43 43 ASTAT0-ASTAT1,CC 0x000008d0 2c 41 51 2c 4c 43 30 2d 4c 43 31 2c 4c 54 30 2d ,AQ,LC0-LC1,LT0- 0x000008e0 4c 54 31 2c 4c 42 30 2d 4c 42 31 2c 52 45 54 53 LT1,LB0-LB1,RETS 0x000008f0 2c 53 45 51 53 54 41 54 2c 53 59 53 43 46 47 2c ,SEQSTAT,SYSCFG, 0x00000900 55 53 50 7d 00 2e 2e 5c 2e 2e 5c 63 70 75 5c 62 USP}.../../cpu/b 0x00000910 6c 61 63 6b 66 69 6e 5c 63 70 75 2e 63 00 05 09 lackfin/cpu.c... 0x00000920 00 00 3e 00 00 00 06 00 00 00 00 00 00 00 00 00 ..>............. 0x00000930 00 00 43 09 00 00 1e 09 00 00 30 00 00 00 0c 00 ..C.......0..... 0x00000940 00 00 00 76 09 00 00 1e 09 00 00 34 00 00 00 7b ...v.......4...{ 0x00000950 52 30 2e 4c 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 R0.L,R0.H,R1.L,R 0x00000960 31 2e 48 2c 50 31 2c 41 53 54 41 54 30 2d 41 53 1.H,P1,ASTAT0-AS 0x00000970 54 41 54 31 7d 00 8f 09 00 00 1e 09 00 00 35 00 TAT1}.........5. 0x00000980 00 00 7b 46 50 2c 53 50 2c 52 45 54 53 7d 00 62 ..{FP,SP,RETS}.b 0x00000990 0a 00 00 1e 09 00 00 36 00 00 00 7b 52 30 2e 4c .......6...{R0.L 0x000009a0 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 31 2e 48 2c ,R0.H,R1.L,R1.H, 0x000009b0 52 32 2e 4c 2c 52 32 2e 48 2c 52 33 2e 4c 2c 52 R2.L,R2.H,R3.L,R 0x000009c0 33 2e 48 2c 50 30 2d 50 32 2c 49 30 2d 49 33 2c 3.H,P0-P2,I0-I3, 0x000009d0 42 30 2d 42 33 2c 4d 30 2d 4d 33 2c 41 30 2e 57 B0-B3,M0-M3,A0.W 0x000009e0 2c 41 30 2e 58 2c 41 31 2e 57 2c 41 31 2e 58 2c ,A0.X,A1.W,A1.X, 0x000009f0 41 53 54 41 54 30 2d 41 53 54 41 54 31 2c 43 43 ASTAT0-ASTAT1,CC 0x00000a00 2c 41 51 2c 4c 43 30 2d 4c 43 31 2c 4c 54 30 2d ,AQ,LC0-LC1,LT0- 0x00000a10 4c 54 31 2c 4c 42 30 2d 4c 42 31 2c 52 45 54 53 LT1,LB0-LB1,RETS 0x00000a20 2c 53 45 51 53 54 41 54 2c 53 59 53 43 46 47 2c ,SEQSTAT,SYSCFG, 0x00000a30 55 53 50 7d 00 2e 2e 5c 2e 2e 5c 63 70 75 5c 62 USP}.../../cpu/b 0x00000a40 6c 61 63 6b 66 69 6e 5c 63 70 75 2e 63 00 35 0a lackfin/cpu.c.5. 0x00000a50 00 00 4a 00 00 00 06 00 00 00 00 00 00 00 00 00 ..J............. 0x00000a60 00 00 73 0a 00 00 4e 0a 00 00 30 00 00 00 24 00 ..s...N...0...$. 0x00000a70 00 00 00 b3 0a 00 00 4e 0a 00 00 34 00 00 00 7b .......N...4...{ 0x00000a80 52 30 2e 4c 2c 52 30 2e 48 2c 52 31 2e 4c 2c 52 R0.L,R0.H,R1.L,R 0x00000a90 31 2e 48 2c 52 32 2e 4c 2c 52 32 2e 48 2c 50 31 1.H,R2.L,R2.H,P1 0x00000aa0 2c 41 53 54 41 54 30 2d 41 53 54 41 54 31 2c 43 ,ASTAT0-ASTAT1,C 0x00000ab0 43 7d 00 d6 0a 00 00 4e 0a 00 00 35 00 00 00 7b C}.....N...5...{ 0x00000ac0 52 37 2e 4c 2c 52 37 2e 48 2c 46 50 2c 53 50 2c R7.L,R7.H,FP,SP, 0x00000ad0 52 45 54 53 7d 00 a9 0b 00 00 4e 0a 00 00 36 00 RETS}.....N...6. 0x00000ae0 00 00 7b 52 30 2e 4c 2c 52 30 2e 48 2c 52 31 2e ..{R0.L,R0.H,R1. 0x00000af0 4c 2c 52 31 2e 48 2c 52 32 2e 4c 2c 52 32 2e 48 L,R1.H,R2.L,R2.H 0x00000b00 2c 52 33 2e 4c 2c 52 33 2e 48 2c 50 30 2d 50 32 ,R3.L,R3.H,P0-P2 0x00000b10 2c 49 30 2d 49 33 2c 42 30 2d 42 33 2c 4d 30 2d ,I0-I3,B0-B3,M0- 0x00000b20 4d 33 2c 41 30 2e 57 2c 41 30 2e 58 2c 41 31 2e M3,A0.W,A0.X,A1. 0x00000b30 57 2c 41 31 2e 58 2c 41 53 54 41 54 30 2d 41 53 W,A1.X,ASTAT0-AS 0x00000b40 54 41 54 31 2c 43 43 2c 41 51 2c 4c 43 30 2d 4c TAT1,CC,AQ,LC0-L 0x00000b50 43 31 2c 4c 54 30 2d 4c 54 31 2c 4c 42 30 2d 4c C1,LT0-LT1,LB0-L 0x00000b60 42 31 2c 52 45 54 53 2c 53 45 51 53 54 41 54 2c B1,RETS,SEQSTAT, 0x00000b70 53 59 53 43 46 47 2c 55 53 50 7d 00 2e 2e 5c 2e SYSCFG,USP}.../. 0x00000b80 2e 5c 63 70 75 5c 62 6c 61 63 6b 66 69 6e 5c 63 ./cpu/blackfin/c 0x00000b90 70 75 2e 63 00 7c 0b 00 00 7c 00 00 00 05 00 00 pu.c.|...|...... 0x00000ba0 00 00 00 00 00 00 00 00 00 ba 0b 00 00 95 0b 00 ................ 0x00000bb0 00 30 00 00 00 10 00 00 00 00 d5 0b 00 00 95 0b .0.............. 0x00000bc0 00 00 34 00 00 00 7b 52 30 2e 4c 2c 52 30 2e 48 ..4...{R0.L,R0.H 0x00000bd0 2c 50 31 7d 00 f8 0b 00 00 95 0b 00 00 35 00 00 ,P1}.........5.. 0x00000be0 00 7b 52 37 2e 4c 2c 52 37 2e 48 2c 46 50 2c 53 .{R7.L,R7.H,FP,S 0x00000bf0 50 2c 52 45 54 53 7d 00 00 00 00 00 95 0b 00 00 P,RETS}......... 0x00000c00 36 00 00 00 7b 52 30 2e 4c 2c 52 30 2e 48 2c 52 6...{R0.L,R0.H,R 0x00000c10 31 2e 4c 2c 52 31 2e 48 2c 52 32 2e 4c 2c 52 32 1.L,R1.H,R2.L,R2 0x00000c20 2e 48 2c 52 33 2e 4c 2c 52 33 2e 48 2c 50 30 2d .H,R3.L,R3.H,P0- 0x00000c30 50 32 2c 49 30 2d 49 33 2c 42 30 2d 42 33 2c 4d P2,I0-I3,B0-B3,M 0x00000c40 30 2d 4d 33 2c 41 30 2e 57 2c 41 30 2e 58 2c 41 0-M3,A0.W,A0.X,A 0x00000c50 31 2e 57 2c 41 31 2e 58 2c 41 53 54 41 54 30 2d 1.W,A1.X,ASTAT0- 0x00000c60 41 53 54 41 54 31 2c 43 43 2c 41 51 2c 4c 43 30 ASTAT1,CC,AQ,LC0 0x00000c70 2d 4c 43 31 2c 4c 54 30 2d 4c 54 31 2c 4c 42 30 -LC1,LT0-LT1,LB0 0x00000c80 2d 4c 42 31 2c 52 45 54 53 2c 53 45 51 53 54 41 -LB1,RETS,SEQSTA 0x00000c90 54 2c 53 59 53 43 46 47 2c 55 53 50 7d 00 00 00 T,SYSCFG,USP}...                 Item Link                               Message Id                             指明在此之后的Item适用的文件名及其偏移量                 文件中的行号和列号             上图中的红 {MOD}部分标明了每个annotation的起始位置,可以明显地看出在每个annotation的开头用4个字节保存了下一个annotation在段数据中的偏移量。 再观察msgid,很容易在每个annotation的第8个字节处发现它们的踪迹,即用黄 {MOD}标出的部分。 观察红 {MOD}和黄 {MOD}之间的4个字节,很容易可以猜测到这个整数表示了一个段中的偏移量,看看它指向哪里?观察这个偏移量所指向的位置的数据,可以猜到这又是一个偏移量,跟着这个偏移量走,可以发现一个字符串“../../cpu/blackfin/cpu.c”,而第二个偏移量就紧跟在这个字符串的后面。在上表中用浅橙 {MOD}标出了这个字符串和跟在它后面的偏移量。这个字符串在elfdump显示出来就是: 0xb95 (0xb95)           Position [kind=0] Simple position: line 124, column 5 in file '../../cpu/blackfin/cpu.c' 在这行显示中,同时还显示了linecolumn的值,这两个值很容易可以在字符串数据之后找到,也就是上表中用淡蓝 {MOD}标出的部分。 至于每个annotation的具体内容,则必须根据msgid进行解释,往往都是一个字符串。    

参考资料

vdsp(bf561)中自定义StackHeap(2007/11/9) VDSP.doj文件到uClinx.O文件的转换2007/12/17 VDSP函数调用时的参数传递