Hi,
I am trying to use cryptopp 5.6 as a shared library in Solaris 10 with
a amd cpu (x86).
The build successfully finishes. Then I link it to the following test
program.

int main(int argc,char *argv[])
{
  printf("test\n");
  return 0;
}

When I run the program I get the following error:
ld.so.1: cluitest: fatal: relocation error: R_AMD64_PC32: file ./
libcryptopp.so: symbol main: value 0x2800143fbe4 does not fit

When I make both the library and test program 32 bit, then everything
works.

I found the following information about relocation errors:
http://blogs.sun.com/rie/entry/my_relocations_don_t_fit

Running elfdump results:
 elfdump -d libcryptopp.so | grep TEXTREL
      [18]  TEXTREL           0
      [26]  FLAGS             0x4                 [ TEXTREL ]

Below you can find versions and compile parameters. Please help.
Best regards.
Murat

libcryptopp.so:  $(LIBOBJS)
        $(CXX) -o $@ -G $(CXXFLAGS) $(LIBOBJS) $(LDFLAGS) $(LDLIBS)

CXXFLAGS:
-DNDEBUG -O2 -m64 -DCRYPTOPP_DISABLE_SSE2  -fPIC -Wa,--divide

uname -a
SunOS april 5.10 Generic_137112-06 i86pc i386 i86pc

gcc:
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/
configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --
with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --
enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
gas:
GNU assembler version 2.20 (i386-pc-solaris2.10) using BFD version
(GNU Binutils) 2.20
ld:
ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.489

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

To unsubscribe, reply using "remove me" as the subject.

Reply via email to