doj中的扩展section: .commandLine

本文解析了vdsp中的doj文件格式,该文件采用了扩展的elf格式,并详细介绍了.commandLine section的结构及其包含的编译命令行信息。

 

快乐虾

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

lights@hb165.com

 

本文适用于

bfinutils-2.19

vs2008

visual dsp++ 5.0

 

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

 

vdsp中的doj文件采用的是elf格式,但是做了一些扩展,其中.commandLine是额外添加上去的一个section,它的section head可取如下值:

 

table 0属性值附加说明
sh_name669Section name, index in string tbl
sh_typeSTRTABType of section
sh_flags0x00000000Miscellaneous section attributes
sh_addr0x00000000Section virtual addr at execution
sh_offset3426Section file offset
sh_size184Size of section in bytes
sh_link0Index of another section
sh_info0x00000000Additional section information
sh_addralign0Section alignment
sh_entsize0Entry size if section holds table

 

它的sh_type值为STRTAB,也即是说这个段中只存储字符串列表。这个段的内容为:

table 0000102030405060708090a0b0c0d0e0f字符串值
0x0000000000433a5c50726f6772616d2046696c65C Program File
0x00000010735c416e616c6f672044657669636573s Analog Devices
0x000000205c56697375616c44535020352e305c65VisualDSP 5 0 e
0x0000003061736d626c6b666e2e657865202e5c75asmblkfn exe u
0x000000402d626f6f745f62617369636372742e73boot basiccrt s
0x00000050202d70726f6320414453502d42463536proc ADSP BF56
0x0000006031202d66696c652d617474722050726f1 file attr Pro
0x000000706a6563744e616d653d752d626f6f7420jectName u boot
0x000000802d67202d73692d7265766973696f6e20g si revision
0x00000090302e33202d6f202e5c44656275675c750 3 o Debug u
0x000000a02d626f6f745f62617369636372742e64boot basiccrt d
0x000000b06f6a202d4d4d2000oj MM

 

实际上就是两个字符串:

table 0起始位置字符串值
10
21C:/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

 

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

 

 

 

参考资料

bfd对多目标的支持 2008-9-25

bfdelf32格式的支持( 2008-11-7 )

objdumpreadelf的区别( 2008-11-10 )

objdump代码分析( 2008-11-10 )

bfd的文件格式识别 2008-11-10

bfd的后端数据表示( 2008-11-10 )

Bfd中的内存泄漏 2008-11-13

Bfdelf文件头的处理( 2008-11-27 )

bfd中添加处理vdsp文件的target( 2008-11-27 )

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

嵌云阁主

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

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

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

打赏作者

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

抵扣说明:

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

余额充值