Hello,
if I declare some variables, for example:
int v1;
int v2;
int v3;
then are allocated in memory in reverse order, for example in the map file:
0x20001100 v3
0x20001104 v2
0x20001108 v1
There is the possibility to indicate to the linker to allocate them in the expected crescent order? I.e.:
0x20001100 v1
0x20001108 v3
The first variables will be place in a lower addresses in stack.
Instead of letting the compiler place the variable into addresses, you can use the address of one variable as base address and allocate the rest before or after this address.
Regards