ld: fatal: relocation error: R_SPARC_H44:

Hi

We are using Solaris 2.9

I am getting following error message when attmepting to do a 64bit make of one of our components.

ld: fatal: relocation error: R_SPARC_H44: file lib/chmod.o: symbol errno: relocations based on the ABS44 coding model can not be used in building a shared object

The final compile command is something like the following

/u01/opt/compiler/SUNWspro/bin/CC -G -xarch=v9 -o lib/libExtProc lib/chmod.o

Can someone help?

[485 byte] By [rouritya] at [2007-11-26 20:45:37]
# 1
HiHas anyone run into this issue?ThanksRaja
rouritya at 2007-7-10 2:07:03 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
Well, if you were building with gcc adding -mcmodel=medany to the compiler flags would probably fix it.I'm not sure what the equivalent sun cc option is though.Its all to do with the memory model the compiler is targetting.
robert.cohena at 2007-7-10 2:07:04 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3

I found the following in the studio 11 documentation...

The default is -xcode=abs32 for SPARC V8. The default for SPARC and UltraSPARC V9 (with -xarch=v9|v9a|v9b) has now changed. The default was -xcode=abs64 but that has changed to -xcode=abs44.

When building shared dynamic libraries, the default -xcode values of abs44 and abs32 will not work with -xarch=v9 or v9a or v9b, so a -xcode value must be given. Specify -xcode=pic13 or -xcode=pic32. There are two nominal performance costs with -xcode=pic13 and -xcode=pic32 on SPARC:

robert.cohena at 2007-7-10 2:07:04 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 4
HiThanks for the response. Still no luck after putting in xcode=pic13 or xcode=pic32Any other suggestions please?Thanks
rouritya at 2007-7-10 2:07:04 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 5
I'm not sure if putting it in the final compile is sufficient or the .o file needs to be built that way as well.Have you added it to all the compilation?
robert.cohena at 2007-7-10 2:07:04 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...