relocation truncated to fit errors

  • Follow


I have 2 directories: a1 and b1
Directory b1 depends on directory a1
Using directory a1, I create a1.lib
Using directory b1, I create b1.lib

Now, using a1 and b1, I create a shared object ab1.so
I've been able to build ab1.so just fine. I made an update to file b1.c
and am now getting a ton of relocation truncated to fit: R_SPARC_GOT13
errors and don't know why. The change I made is nothing out of the
ordinary, just a few more if statements to a function.

I'm building on Solaris 7, gcc 2.95.2
This same code compiles just fine under RedHat9 and Suse9.3.

Anyone have any suggestions as to how to fix this?

Thank you.

0
Reply amy.comstock (1) 8/29/2006 8:15:29 PM

amy.comstock@gmail.com writes:

> Now, using a1 and b1, I create a shared object ab1.so
> I've been able to build ab1.so just fine. I made an update to file b1.c
> and am now getting a ton of relocation truncated to fit: R_SPARC_GOT13
> errors and don't know why.

Because your code or data size has increased.

Read "man cc" or "info gcc", and pay attention to -Kpic/-KPIC or
-fpic/-fPIC description, then replace '-[Kf]pic' with '-[Kf]PIC'
on you compile and link lines.

You probably should also read this:
  http://www.catb.org/~esr/faqs/smart-questions.html

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
0
Reply Paul 8/29/2006 9:56:36 PM


1 Replies
325 Views

(page loaded in 0.048 seconds)


Reply: