linking errors from a complete newbie

You need to be logged in to post to this forum.

Theodore Sung

Post Count: 7
4/9/2008 2:13 pm
Hi,

I'm linking my C code library (mpicc ...) to create a dynamic library and I get the following link error:

cmotax.o:....: relocation truncated to fit: R_MIPS_GPREL16 agains 'no symbol'.

Any idea what this means and how should I work around it?

Thanks,

Ted
David Stephenson
PathScale Compiler Engineer
Post Count: 5
4/10/2008 11:58 am
There was a problem in the gcc linker that caused the global
offset table (GOT) to balloon in size unnecessarily, which in
turn caused the GP-relative space to overflow. The symptoms
of this bug are link-time error messages such as:

... relocation truncated to fit: R_MIPS_GOT_DISP against ...
... relocation truncated to fit: R_MIPS_CALL16 against ...

The bug has been fixed, and the fix will be in the next
software release.

In the meantime, try compiling all your files with the flag
"-G 0". This flag often (although not always) works around
the problem (although it can affect performance). If "-G 0"
works, you can also try "-G 4" as a compromise.

You need to be logged in to post to this forum.