<p>How do you get a pointer to the .text section of memory for a program from within that program?  I also need the length of the section to do a "Flash to Memory" compare as part of a continuous selftest that runs in the background.</p>

<p>The toolset automatically generates the linker .cmd file for the tools I'm using, and the Board Support Package for the board I'm using requires I use the generated .cmd file instead of making my own.  (No make file either to add a script to muck with it afterwords.)</p>

<p>Edit:
I'm working with a TI TMS 6713 DSP using the code composer 3.1 environment. The card I'm using was contracted by our customer and produced by another organization so I can't really point you to any info on it. However the BSP is dependant upon TI's "DSP BIOS" config tool, and I can't really fudge the settings too much without digging into an out of scope effort.</p>

You need to put "variables" in the linker script.
In one of my projects I have this in one of my sections:
```
```
__FlashStart = .;
```
```
In the C program I have this:
```
```
extern unsigned long int _FlashStart;
unsigned long int address = (unsigned long int)&_FlashStart;
```
```