 Question: A cleaner way of fixing the location of
sections from C. We have a pragama directive called DATA_SECTION which does this.
Answer:
#pragma DATA_SECTION(loose, .memloc)
struct VARS {
int VarA;
int VarB;
int VarC;
int VarD;
} loose;
void funcA( void )
{
loose.VarA = loose.VarD;
}
What the above pragma generates is the following:
.global _loose
_loose .usect .memloc,loosesize,1,0
All you have to do now is map the above section in the
linker. |