ld -soname libtest.so -shared -o libtest.so test.o
-L/usr/src/1.3.33/openssl-0.9.8 --whole-archive -lssl -lcrypto
-no-whole-archive

First of all I'd recommend to use gcc -shared even to link shared objects. Not that this would remedy the "R_X86_64_PC32 is no good for shared object," it's just that using gcc is more fool-proof, as it will also link in run-time environment initialization code [which might be required]. In order to pass linker specific options use -Wl prefix, e.g. you'd have to replace -soname libtest.so with -Wl,-soname,libtest.so in gcc command line.

ld: /usr/src/1.3.33/openssl-0.9.8/libcrypto.a(x86_64cpuid.o): relocation
R_X86_64_PC32 against `OPENSSL_cpuid_setup' can not be used when making
a shared object; recompile with -fPIC
ld: final link failed: Bad value

The openssl was config'd as no-shared no-threads -fPIC -DPIC.

If you can confirm that './config shared' works, then adding -Wl,-Bsymbolic to your command line should do the trick. A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to