C++技巧:doj中的扩展section:.commandLine

C++技巧:doj中的扩展section:.commandLine,第1张

C++技巧:doj中的扩展section:.commandLine,第2张

vdsp中的doj文件采用elf格式,但做了一些扩展,其中。commandLine是一个附加节,它的节头可以取以下值:

0表属性值的附加描述
sh_name 669节名称,字符串中的索引tbl
sh_type STRTAB节类型
sh_flags 0x00000000杂项节属性
sh_addr 0x00000000执行时的节虚拟地址
sh_offset 3426节文件偏移量
sh_size 184节的字节大小
sh_link 0另一节的索引

它的sh_type值是STRTAB,这意味着这个段中只存储字符串列表。这一段的内容是:

0 00 01 02 03 04 05 06 07 08 09 0 a 0 b 0d 0 e0f字符串值
0x 0000000 00 43 3a 5c 50 72 6f 67 72 61 6d 20 46 69 6c 65c程序文件
0x 000000010 73 5c 41 6e 61 6c 6f 67 20 44 65 76 69 63 65 73s Analog Devices
0x 0000000020 5c 55 0x 00000030 61 73 6d 62 6c 6b 66 6e 2e 65 78 65 20 2e 5c 75 asmblkfn exe u
0x 000000040 2d 62 66 f 74 5f 62 61 73 69 63 72 74 2e 73 boot basic CRT s
0x 000000050 20 2d 70 72 6f 63 20 41 44 53 50 2d 42 46 35 36 proc 0x 00000060 31 20 2d 66 69 6c 65 2d 61 74 72 20 50 72 6f 1 file attr Pro
0x 000000070 6a 65 63 74 4e 61 6d 65 3d 75 2d 62 6f 6f 74 20 jetname u boot
0x 000000080 2d 67 20 2d 73 69 2d 72 65 76 69 6f 6e 20g si修订版
0x 00000090 30 2e 33 20 2d 6f 20 2e 5c 44 65 62 75 67 5c 75 0 3o Debug u
0x 000000 A0 2d 62 6f 6f 74 5f 62 61 73 69 63 63 72 74 2e 64 boot basic CRT d
0x 000000 B0 6f 6a 20 2d 4d 4d 20 00 OJ MM

其实就是两根弦:

0表格起始位置字符串值
1 0
2 1c:\ program files \ analog devices \ visual DSP 5.0 \ easmblkfn.exe。\ u-boot _ basic CRT . s-proc ADSP-BF 561-file-attr project name = u-boot-g-si-修订版0.3-o。\ Debug \ u-boot _ basic CRT . DOJ-MM

第一个空字符串,第二个是编译时的命令行!

位律师回复
DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
白度搜_经验知识百科全书 » C++技巧:doj中的扩展section:.commandLine

0条评论

发表评论

提供最优质的资源集合

立即查看 了解详情