Hi,
i am trying to make a COFF file parser based on the SPRAAO8:
http://www.ti.com/lit/an/spraao8/spraao8.pdf
I have a question about how the pointer in "Character" bits of Section Header structure be interpreted:
For example when i try to parse the following COFF out data for MSP430:
http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/343/5047.BLINK.out
for the first section i got the following data:
Sect Hdr 0:
00 00 00 00 7D 02 00 00 00 00 00 00 00 00 00 00 6F 00 00 00 22 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 08 00 00 00
Chars : 00 00 00 00 7D 02 00 00
Phy addr : 00 00 00 00
Virtual addr : 00 00 00 00
Size : 6F 00 00 00
Raw data ptr : 22 07 00 00
Reloc entry ptr : 00 00 00 00
Reserved : 00 00 00 00
Num of reloc ent : 00 00 00 00
Num of line ent : 00 00 00 00
Flags : 10 00 00 00
Reserved : 08 00
Mem page num : 00 00
The question is how shall i interpret the 00 00 00 00 7D 02 00 00 in the Character field?
If i parse through the COFF file, the string table will look like this (byte count - content):
{'0x2dca': '$C$DW$L$main$3$B',
'0x2dec': '$C$DW$L$main$4$B',
'0x2f87': '_c_int00_noinit_noexit',
'0x2ed1': '_lock.asm',
'0x2dad': '.debug_line',
'0x2ead': 'pre_init.asm',
'0x2fc7': '__TI_args_main',
'0x2fb6': '_system_pre_init',
'0x2ff7': '.debug_abbrev',
'0x2db9': '$C$DW$L$main$2$B',
'0x2e0e': '$C$DW$L$main$4$E',
'0x2edb': '.text:_nop',
'0x2f44': '__STACK_END',
'0x2e96': '.text:abort',
'0x2f65': '__edata__',
'0x2e78': 'copy_zero_init.asm',
'0x2e2a': '.text:_c_int00_noinit_noexit',
'0x2d86': '.mspabi.extab',
'0x2f5b': '__etext__',
'0x2f7a': '_cleanup_ptr',
'0x2f23': '__pinit__',
'0x2fac': '__TI_exit',
'0x2e8b': 'epilog.asm',
'0x2f37': '__STACK_SIZE',
'0x2ea2': 'memcpy.asm',
'0x2f6f': '_dtors_ptr',
'0x2ef4': 'autoinit.asm',
'0x2ee6': 'args_main.asm',
'0x2f9e': '_reset_vector',
'0x2fe5': '$build.attributes',
'0x2da0': '.debug_frame',
'0x2dfd': '$C$DW$L$main$3$E',
'0x2eba': '.text:_system_pre_init',
'0x2e1f': '.text:main',
'0x2f50': '__c_args__',
'0x2e60': 'copy_decompress_rle.asm',
'0x2f0d': 'CALBC1_1MHZ',
'0x2f2d': '__binit__',
'0x2d6c': '.init_array',
'0x2f19': '__cinit__',
'0x2d78': '.mspabi.exidx',
'0x2d94': '.debug_info',
'0x2fd6': '__TI_auto_init',
'0x2ddb': '$C$DW$L$main$2$E',
'0x2f01': 'CALDCO_1MHZ',
'0x2e47': 'copy_decompress_none.asm'}
I can't anyhow relate the data in the Character field above to any byte count here in the string table list.
Thanks for the help.