Thread: SPARC Solaris 11.1 GCC Comp Error: relocation error: R_SPARC_GOTDATA_HIX22

  1. #1
    Registered User
    Join Date
    Mar 2014
    Posts
    1

    SPARC Solaris 11.1 GCC Comp Error: relocation error: R_SPARC_GOTDATA_HIX22

    Hello All,

    First post so please bear with me .

    I have a compilation error (see below), on some but not all of our C programs.

    The server is a T4-2 64b SPARC Solaris 11.1 server and we are using gcc 4.5.2. We are also using third-party Unify Dataserver C libraries. It's a new server which I'm failing badly to setup

    I'm not sure what the error is referring to and I'm struggling to understand the small amounts of references to it on the internet when I do a search!

    :!make -f makefile.gcc brsect
    Linking Objects brsect.o reglib.o bsgdef.o bsglib.o
    ld: fatal: relocation error: R_SPARC_GOTDATA_HIX22: file brsect.o: symbol sysdata: value 0x3cd2b5 does not fit
    ld: fatal: relocation error: R_SPARC_GOTDATA_HIX22: file brsect.o: symbol sysdata: value 0x3cd2b5 does not fit
    ld: fatal: relocation error: R_SPARC_GOTDATA_HIX22: file brsect.o: symbol strsecttots: value 0x3cd2b4 does not fit
    ld: fatal: relocation error: R_SPARC_GOTDATA_HIX22: file brsect.o: symbol sysdata: value 0x3cd2b5 does not fit
    .....

    Can anyone point me in the right direction:
    Is it a coding error?
    gcc config error?
    Missing gcc passed argument?
    third-party software error?
    OS error?

    Any help would be appreciated, thanks in advance.

    Regards
    Adrian

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    Really hard to tell without seeing the make file and code. This post seems to suggest some sort of gcc "config" issue, specifically that you build the object files incorrectly and the linker can't link them correctly. You should have make print out all the commands it runs too, so you can see for certain exactly what options are being used for the compile and link steps.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 07-24-2011, 09:38 PM
  2. Fatal error with solaris socket
    By WaterNut in forum Linux Programming
    Replies: 10
    Last Post: 05-26-2005, 01:12 PM
  3. More relocation stuff
    By willkoh in forum Windows Programming
    Replies: 1
    Last Post: 04-15-2005, 07:50 AM
  4. Relocation in .obj -files
    By willkoh in forum C++ Programming
    Replies: 6
    Last Post: 04-06-2005, 01:59 PM
  5. inline asm on a sparc
    By Alien_Freak in forum Linux Programming
    Replies: 1
    Last Post: 04-14-2002, 12:43 AM

Tags for this Thread