> We have a problem building apache 2.0.55 with OpenSSL 0.9.8a. When
> linking mod_ssl the linker gives an error:
> 
> Text relocation remains                         referenced
>     against symbol                  offset      in file
> DES_SPtrans                         0x1220     
> /usr/local/workdir/bld/openssl/lib/libcrypto.a(des_enc-sparc.o)
> ld: fatal: relocations remain against allocatable but non-writable sections

Make sure you link with -Bsymbolic. This resolves the relocation in 
question in proper manner. Linking with -Bsymbolic gives you a number of 
advantages. It's a tad faster and more secure. "Secure" means that it 
would be impossible for another module to override function definitions 
in your module and thus cause unexpected behaviour. In particular this 
means that different -Bsymbolic modules linked with different versions 
can coexist in same application.

> gcc calls the linker with "-z text". If I omit this flag, the link
> succeeds. gcc documentation indicates, that a clean build with -fPIC
> should not give that problem.

gcc refers to code generated by itself, not hand-coded assembler such as 
des_enc-sparc.o.

>   Branch: OpenSSL_0_9_8-stable             Handle: 2005080311442900
> 
>   Modified files:           (Branch: OpenSSL_0_9_8-stable)
>     openssl/crypto/des/asm  des_enc.m4
> 
>   Log:
>     PIC-ify SPARC assembler in alternative manner to eliminate dependency on
>     OPENSSL_PIC macro [from HEAD].
> 
> If I use the des_enc.m4 from 0.9.8 I don't get the build error (although
> with 0.9.8 destest dumps core, so that is no option).

The referred commit addressed this very problem, destest core dump. A.

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

Reply via email to