ΣSigmaStudio Ask AI Русский Log in

Executable file format and section definition

Processors & DSP dacheng Aug 25, 2010 00:00 2 replies Original on forum ↗
Subscribe
dacheng Question
Aug 25, 2010 00:00

Hello everyone,

Here I have two questions.

1, I read the user manual, it says the executable file is COFF, but I saw somewhere else ,the executable file is .dxe, which is said to be a ELF file.also the article says the .exe is a COFF format. Is this because that different companies using different executable format?

I am confused with this, can anyone give me an answer?

2, when I read the .asm file, I found that the ".text" is written in a very strange way like the following:

------------

.sect ".text"
.global _AvgFirCoeff
.sym _AvgFirCoeff,_AvgFirCoeff, 51, 2, 256,, 16
.bss _OutputDataMem,2,2
.sym _OutputDataMem,_OutputDataMem, 3, 3, 16

.sect ".cinit:c"
.align 4
.field _OutputDataMem,32 ; _OutputDataPtr @ 0

.sect ".text"
.global _OutputDataPtr
_OutputDataPtr: .usect ".bss:c",4,4
.sym _OutputDataPtr,_OutputDataPtr, 19, 2, 32

.sect ".cinit:c"
.align 4
.field 4,32 ; _GUARD_BITS @ 0

.sect ".text"
.global _GUARD_BITS
_GUARD_BITS: .usect ".bss:c",4,4

---------

I am wondering why the .text section can not be written once, instead a new section ".cinit:c" is inserted and we have lots of segments of .text section and .cinit:c section.

Is this the tradition to write DSP assembly? if so can anyone explain why?

Thank you very much.

-da

ADIApproved Reply
Aug 25, 2010 00:00

Hi Da,

As mentioned on the other thread, the VisualDSP++ tools used to produce COFF format files, and we subsequently moved to ELF format files. The old COFF format executables produced by VisualDSP were *.exe files, while the VisualDSP++ ELF executables are *.dxe files. Different tools and different comapnies produce different output file formats.

The important thing is that those tools know how to extract the machine code from their file format. e.g. VisualDSP++ knows how to extract a VisualDSP++-produced DXE file to get the machine code and load it to the processor. Third party tools, like uClinux, will not be able to load a VisualDSP++ executable (or handle objects produced by VisualDSP++) as the ELF format produced by VisualDSP++ is not compatible with the format used by uClinux.

I believe the .text and .cinit sections you are referring to are in the assembly produced by TI's tools. If I am wrong, please let me know what version and update of VisualDSP++ you are using. e.g. VisualDSP++ 5.0 Update 8.

Note that we only support ADI DSPs within the Embedded Processing and DSP forum. The EngineerZone is for the support and discussion of ADI parts, and we cannot offer support beyond these products. If you are using TI's tools, their forums/support channels would be the appropriate place for such questions.

regards,

Craig.

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin