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.

Keeping many variables in a static location from compile to compile

I'm working on an application where I will be doing Field upgrading of the Flash on a Stellaris part.  There is a portion of the memory that is the "stateful" variables that need to stay the same and survive a firmware upgrade.  The hard way to do this looks to be assigning each variable to its own DATA_SECTION and manually placing them in the linker file.  What I would like to do is create a C file, say StatefulVariables.c which uses SET_DATA_SECTION at the beginning and then know that as long as I don't change the definition of those variables, they will always show up in the same location even if the code, in other files, references them.  The DATA_SECTION will be defined to a specific memory location in the linker file, but the individual variables in it will not be specified in the linker.

Am I putting too much trust in the linker to do the same thing, every time?  If I created a structure with all the variables in it, would that help at all?  Thanks for your help.