- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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 more than 64KB。 How to solve it? A document said that the -G compiler option should be fixed. This option sets the threshold size. But how to make it? Help me. Thanks!コピーされたリンク
5 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
hi Dugufei,
did you try -G0 ? i had this problem with redboot... fixed with this option. found somewhere here in this forum. maybe it works for you, too. regards, martin- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Yes, I've tried from -G0 to -G4. But it didn't work!
The Altera's document didn't say clearly. --- Quote Start --- originally posted by mrwgm@Oct 26 2006, 04:24 AM hi dugufei,
did you try -g0 ?
i had this problem with redboot... fixed with this option. found somewhere here in this forum. maybe it works for you, too.
regards, martin
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=18925)
--- quote end ---
--- Quote End ---
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
you should double check your code, something should be wrong with your source.
you can try get rid of the variable which lead to fail.- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi 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.- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
But I can run seccussfly the same code in ARM7 platform. So, I think the code is all right.
Now I want to port the code into Nios2. The problem is what is the right -G compiler option。