If an object file that makes extern declaration of a variable is linked before an object file
that temporarily defines a variable, the linker determines the location of the variable of extern declaration first.
To locate variables in the order of declaration, the object file that temporarily defines a variable must be linked before
the object file that makes extern declaration of that variable.
Example:
/* func1.c */
extern int b;
void func1( void )
{
...
}
/* func2.c */
int a;
int b;
int c;
void func2( void )
{
...
}
c: \> ld850.exe file1.o file2.o
Variables b, a, and c are located in that order because variable b is located first by file1.o of extern declaration.
c: \> ld850.exe file2.o file1.o
Variables a, b, and c are located in that order because extern declaration of variable b of file1.o
is made after variables a, b, and c of file2.o are located.

When variables are defined by using the #pragma section, they are located in the order in which they have been defined.
Example:
#pragma section sdata begin
unsigned short a;
unsigned short b;
unsigned short c;
#pragma section sdata end