This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Accessing the size of .text at run time

Other Parts Discussed in Thread: SYSBIOS

How do I get hold of the size of the .text region for use at run time?

I am using a linker file generated by the XDC tools and also providing a supplemental linker command file to define other sections.  Ideally I would like to modify my own linker file rather than editing the XDC one or creating a new template.

According to the Assembly Language Tools User's Guide section 7.5.8.4 the symbol 'etext' is defined as the end of executable code which is exactly what I want, however this symbol is ffffffff in my map file. 

The 'LOAD_SIZE' operator looks useful but if I use something like..

.text             { *(.text) }, LOAD_START(_code_start), LOAD_SIZE(_code_size) > DDR_CODE

in my command file it generates another .text section in addition to that generated by the XDC tools.

The platform is a C6748 DSP with: Compiler 7.3.8, SysBios 6.34.0.12, XDC tools 3.24.1.29

Thanks,

Andy