Trying to build OpenSSL 0.9.6g on Solaris 8/Intel with a fixed
solaris-x86-gcc shared configuration and a proper invokation of gcc (using
-shared instead of gcc -G as explained in a previous report) fails since the
assembler sources used contain text relocations.  The link step fails with
errors like this:

+ gcc -shared -G -o libcrypto.so.0.9.6 -h libcrypto.so.0 -z allextract libcrypto.a -L. 
+-z defs -lsocket -lnsl -ldl -lc 
Text relocation remains                         referenced
    against symbol                  offset      in file
<unknown>                           0x22d2      libcrypto.a(dx86-sol.o)

and many more.  This lets building libcrypto.so fail.  Unfortunately, it is
not even possible to turn off the -z text implied with -shared with a
subsequent -z textoff, since the linker complains:

ld: fatal: option -ztextoff and -ztext are incompatible
ld: fatal: Flags processing errors

Anyway, shared libraries with remaining text relocations are not really
useful since they are not sharable, greatly diminishing their utility.  So
perlasm and the various x86 assembler implementations should be fixed to
produce proper PIC code if shared libraries are to be produced.  The
affected files during the Solaris 8/Intel compilation were

  crypto/bf/asm/bx86-sol.o
  crypto/cast/asm/cx86-sol.o
  crypto/des/asm/dx86-sol.o
  crypto/des/asm/yx86-sol.o
  crypto/md5/asm/mx86-sol.o
  crypto/rc4/asm/rx86-sol.o
  crypto/sha/asm/sx86-sol.o

For the record, here's the test report:

OpenSSL self-test report:

OpenSSL version:  0.9.6g
Last change:      [In 0.9.6g-engine release:]...
Options:          --prefix=/vol/openssl --openssldir=/vol/openssl/share shared
OS (uname):       SunOS arenal 5.8 Generic_111920-01 i86pc i386
OS (config):      i86pc-whatever-solaris2
Target (default): solaris-x86-cc
Target:           solaris-x86-gcc
Compiler:         Configured with: /vol/gnu/src/gcc/gcc-3.1-branch-dist/configur
e --prefix=/vol/gnu --with-local-prefix=/vol/gnu --disable-nls
Thread model: posix
gcc version 3.1

Test passed.

        Rainer

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to