Discussion:
"relocation truncated to fit"
(too old to reply)
Grant
2005-11-23 01:46:34 UTC
Permalink
I'm getting that error when I try to link lab3. The location is given as
(.text+0x128, 144, and 160), but I cannot figure out where that corresponds
to in my code. I looked at the debugging FAQ and I'm never trying to "move"
a label to a register as it suggests.

Is there anything else that may cause a "relocation truncated to fit" error?
or
How can I figure out where (.text+0x128) is in my code?

Grant
Nick McCowin
2005-11-23 04:42:00 UTC
Permalink
I had this same error when I was linking. I was able to fix it by changing
something like the following code:

add %r1, MEM, %r1

into this:

set MEM, %r2
add %r1, %r2, %r1

I'm guessing this happens because the value of MEM is more than a 13 bit
constant. Hope this helps.
Post by Grant
I'm getting that error when I try to link lab3. The location is given as
(.text+0x128, 144, and 160), but I cannot figure out where that
corresponds to in my code. I looked at the debugging FAQ and I'm never
trying to "move" a label to a register as it suggests.
Is there anything else that may cause a "relocation truncated to fit" error?
or
How can I figure out where (.text+0x128) is in my code?
Grant
Grant
2005-11-23 05:25:21 UTC
Permalink
That sounds right. I did something similar. Thanks

Grant

Loading...