An issue has been identified with the linker script generated by the 11.1 version of the Nios® II Board Support Package (BSP) generator. The issue leads to link errors similar to the following:
/opt/altera/11.0sp1/nios2eds/bin/gnu/H-i686-pc-linux-gnu/bin/.. /lib/gcc/nios2-elf/4.1.2/.. /.. /.. /.. /nios2-elf/lib/libstdc .a (locale.o) : en fonction « std::locale:id::_M_id() const » :
/build/swbuild/SJ/nightly/11.0sp1/208/l32/work/ip/sopc/app/gnu/build/gnu/build-0-gcc.nios2-elf.i686-pc-linux-gnu/nios2-elf/libstdc -v3/src/.. /.. /.. /.. /src/gcc-4.1/libstdc -v3/src/locale.cc:436 : avertissement : impossible d’atteindre (null) (à 0x00e77e74) du pointeur global (à 0x00d217f0) car le décalage (1402500) est hors de la plage autorisée, -32678 à 32767.
Pour résoudre ce problème, ouvrez le script linker.x linker dans le BSP et modifiez la ligne suivante :
.rwdata LOADADDR (.rodata) SIZEOF (.rodata) : AT ( LOADADDR (.rodata) SIZEOF (.rodata) SIZEOF (.rwdata) )
Supprimez la dernière directive SIZEOF (.rwdata) pour définir correctement la section .rwdata comme suit :
.rwdata LOADADDR (.rodata) SIZEOF (.rodata) : AT ( LOADADDR (.rodata) SIZEOF (.rodata) )
Ce problème sera résolu dans une version ultérieure des outils de construction de logiciels Nios II pour Eclipse.