Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHelp! Problem in linking!
I met the problem whem linking: Unable to reach (at 0x0009bf4c) from the global pointer (at 0x000861e0) because the offset (89452) is out of the allowed range, -32678 to 32767. The code was ...
Altera_Forum
Honored Contributor
19 years agoHi Dugufei,
I sometimes get this error when trying to access data in a different section. I have a section of battery-backed SRAM, away from the RAM used for my code and bss. To put something in the NVR I have to use: # define COMM_NVR __attribute__((section(".common_nvr"))) // example of putting variable in NVR. unsigned char fred COMMON_NVR; When I want to access fred from another file I have to: extern unsigned char fred COMMON_NVR; If I forget to add the COMMON_NVR attribute then I get the linker error you describe, 'Can't reach....'. So maybe your unreachable variable isn't where you think it is. Banx.