DSP

doj中的扩展section: .attributes

2019-07-13 12:54发布

  快乐虾 http://blog.csdn.net/lights_joy/ lights@hb165.com    本文适用于 bfinutils-2.19 vs2008 visual dsp++ 5.0   欢迎转载,但请保留作者信息   vdsp中的doj文件采用的是elf格式,但是做了一些扩展,其中.attributes是额外添加上去的一个section,它的section head可取如下值:   table 0 属性值 附加说明sh_name 17 Section name, index in string tblsh_type STRTAB Type of sectionsh_flags 0x00000000 Miscellaneous section attributessh_addr 0x00000000 Section virtual addr at executionsh_offset 24173 Section file offsetsh_size 248 Size of section in bytessh_link 0 Index of another sectionsh_info 0x00000000 Additional section informationsh_addralign 0 Section alignmentsh_entsize 0 Entry size if section holds table它的sh_type值为STRTAB,也即是说这个段中只存储字符串列表。按STRTAB将它的内容展开: table 0 起始位置 字符串值1 0 2 1 ProjectName common3 20 ProjectName common4 39 FuncName _env_get_addr5 62 FuncName _env_get_char_memory6 92 FuncName _env_crc_update7 117 FuncName _env_get_char_init8 145 FuncName _env_relocate9 168 FuncName _env_complete10 191 Content CodeData11 208 si-revision 0.312 224 processor-id ADSP-BF561  很明显,每一行都定义了一个attribute,用/t将属性的名称和值分开,这样,上表的内容就可以解释为:   table 0 属性名称 属性值1 ProjectName common2 ProjectName common3 FuncName _env_get_addr4 FuncName _env_get_char_memory5 FuncName _env_crc_update6 FuncName _env_get_char_init7 FuncName _env_relocate8 FuncName _env_complete9 Content CodeData10 si-revision 0.311 processor-id ADSP-BF561   

参考资料

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) doj中的扩展section: .commandLine(2008-11-28)