vdsp中的doj文件采用的是elf格式,但是做了一些擴(kuò)展,其中.commandLine是額外添加上去的一個(gè)section,它的section head可取如下值:
table 0 屬性值 附加說(shuō)明
sh_name 669 Section name, index in string tbl
sh_type STRTAB Type of section
sh_flags 0x00000000 Miscellaneous section attributes
sh_addr 0x00000000 Section virtual addr at execution
sh_offset 3426 Section file offset
sh_size 184 Size of section in bytes
sh_link 0 Index of another section
sh_info 0x00000000 Additional section information
sh_addralign 0 Section alignment
sh_entsize 0 Entry size if section holds table
它的sh_type值為STRTAB,也即是說(shuō)這個(gè)段中只存儲(chǔ)字符串列表。這個(gè)段的內(nèi)容為:
table 0 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 字符串值
0x00000000 00 43 3a 5c 50 72 6f 67 72 61 6d 20 46 69 6c 65 C Program File
0x00000010 73 5c 41 6e 61 6c 6f 67 20 44 65 76 69 63 65 73 s Analog Devices
0x00000020 5c 56 69 73 75 61 6c 44 53 50 20 35 2e 30 5c 65 VisualDSP 5 0 e
0x00000030 61 73 6d 62 6c 6b 66 6e 2e 65 78 65 20 2e 5c 75 asmblkfn exe u
0x00000040 2d 62 6f 6f 74 5f 62 61 73 69 63 63 72 74 2e 73 boot basiccrt s
0x00000050 20 2d 70 72 6f 63 20 41 44 53 50 2d 42 46 35 36 proc ADSP BF56
0x00000060 31 20 2d 66 69 6c 65 2d 61 74 74 72 20 50 72 6f 1 file attr Pro
0x00000070 6a 65 63 74 4e 61 6d 65 3d 75 2d 62 6f 6f 74 20 jectName u boot
0x00000080 2d 67 20 2d 73 69 2d 72 65 76 69 73 69 6f 6e 20 g si revision
0x00000090 30 2e 33 20 2d 6f 20 2e 5c 44 65 62 75 67 5c 75 0 3 o Debug u
0x000000a0 2d 62 6f 6f 74 5f 62 61 73 69 63 63 72 74 2e 64 boot basiccrt d
0x000000b0 6f 6a 20 2d 4d 4d 20 00 oj MM
實(shí)際上就是兩個(gè)字符串:
table 0 起始位置 字符串值
1 0
2 1 C:\Program Files\Analog Devices\VisualDSP 5.0\easmblkfn.exe .\u-boot_basiccrt.s -proc ADSP-BF561 -file-attr ProjectName=u-boot -g -si-revision 0.3 -o .\Debug\u-boot_basiccrt.doj -MM
第一個(gè)空串,第二個(gè)就是編譯時(shí)的命令行!
table 0 屬性值 附加說(shuō)明
sh_name 669 Section name, index in string tbl
sh_type STRTAB Type of section
sh_flags 0x00000000 Miscellaneous section attributes
sh_addr 0x00000000 Section virtual addr at execution
sh_offset 3426 Section file offset
sh_size 184 Size of section in bytes
sh_link 0 Index of another section
sh_info 0x00000000 Additional section information
sh_addralign 0 Section alignment
sh_entsize 0 Entry size if section holds table
它的sh_type值為STRTAB,也即是說(shuō)這個(gè)段中只存儲(chǔ)字符串列表。這個(gè)段的內(nèi)容為:
table 0 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 字符串值
0x00000000 00 43 3a 5c 50 72 6f 67 72 61 6d 20 46 69 6c 65 C Program File
0x00000010 73 5c 41 6e 61 6c 6f 67 20 44 65 76 69 63 65 73 s Analog Devices
0x00000020 5c 56 69 73 75 61 6c 44 53 50 20 35 2e 30 5c 65 VisualDSP 5 0 e
0x00000030 61 73 6d 62 6c 6b 66 6e 2e 65 78 65 20 2e 5c 75 asmblkfn exe u
0x00000040 2d 62 6f 6f 74 5f 62 61 73 69 63 63 72 74 2e 73 boot basiccrt s
0x00000050 20 2d 70 72 6f 63 20 41 44 53 50 2d 42 46 35 36 proc ADSP BF56
0x00000060 31 20 2d 66 69 6c 65 2d 61 74 74 72 20 50 72 6f 1 file attr Pro
0x00000070 6a 65 63 74 4e 61 6d 65 3d 75 2d 62 6f 6f 74 20 jectName u boot
0x00000080 2d 67 20 2d 73 69 2d 72 65 76 69 73 69 6f 6e 20 g si revision
0x00000090 30 2e 33 20 2d 6f 20 2e 5c 44 65 62 75 67 5c 75 0 3 o Debug u
0x000000a0 2d 62 6f 6f 74 5f 62 61 73 69 63 63 72 74 2e 64 boot basiccrt d
0x000000b0 6f 6a 20 2d 4d 4d 20 00 oj MM
實(shí)際上就是兩個(gè)字符串:
table 0 起始位置 字符串值
1 0
2 1 C:\Program Files\Analog Devices\VisualDSP 5.0\easmblkfn.exe .\u-boot_basiccrt.s -proc ADSP-BF561 -file-attr ProjectName=u-boot -g -si-revision 0.3 -o .\Debug\u-boot_basiccrt.doj -MM
第一個(gè)空串,第二個(gè)就是編譯時(shí)的命令行!