Simple option:
Identify
int * const key = (int *)0x9000;
and *keylink to elsewhere (or use the link).
Non-error option:
externs ! , . extern int key;, key . script (. ld) , --defsym.
gcc, -Xlinker, .
gcc -o outfile -Xlinker --defsym -Xlinker key=0x9000 sourcefile.c
, , 0x9000.
#include <stdio.h>
extern int key;
int main(void) {
printf("%p\n", &key);
return 0;
}
, - , , , , ld script.