Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

global pointer relative address out of range

"Object/null_driver.o(.text+0x18): global pointer relative address out of range"

anyone knows how to modify generated.x file to fix http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/rolleyes.gif problem?

Is this a compiler bug? I have read

http://www.niosforum.com/forum/index.php?a...t=st&f=17&t=524 (http://www.niosforum.com/forum/index.php?act=st&f=17&t=524)

and

http://www.niosforum.com/forum/index.php?a...t=st&f=17&t=609 (http://www.niosforum.com/forum/index.php?act=st&f=17&t=609)

is Nios II 1.01 release out yet?

Thanx in advance for all the help

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    1.01 (also called 1.0 SP1) is out now, and 1.1 will be available very soon.

    What is at address .text+0x18 in your code (link with --noinhibit-exec and look in the objdump file to find out)? Also, what is the source code which triggers the warning trying to do?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I saw the same problem on a design of mine, when trying to use some variables in onchip ram and others in external SRAM. Because the the difference in addresses is too big, I got the same error.

    till now I had to put them all toghether in SRAM. And I use already 1.0 SP1.

    According to me, the compiler should be aware of the fact the address is not matching the criteria for the global pointer trick, and should swap to another system of loading the variabele.

    I think for accessing internal RAM (it is in the very low part of the address range), also one instruction is enough to load the address (< 65536).

    Stefaan