Altera_Forum
Honored Contributor
19 years agoGlobal pointer _gp
Dear Forum
I'm trying to allocate some data in a new section to avoid having them zeroed during a boot. I use __attribute__ ((section (".nv_sram"))) after the declaration of the variable and then add the following lines in the linker script to have the section output in the binary too. .nv_sram : { . = ALIGN(32 / 8); } > sram this outputs the section after the .rwdata section but before the .bss section. This works nicely as long as I keep the nv_sram relatively small. If I increase the size of nv_sram I get the Unable to reach (some addr) from global pointer. when compiling. I've tried to output the section after the bss which compiles but chrashes in the target. Could anybody point me to some doc on the global pointer or even better the right way of telling the startup code to leave variables untouched ? Regards Jacob