[csw-maintainers] Symbol versioning for openssl ?

Joerg Schilling Joerg.Schilling at fokus.fraunhofer.de
Tue Jul 24 11:29:58 CEST 2012


Yann Rouillard <yann at pleiades.fr.eu.org> wrote:

> Oh, I think I've found something interesting.
>
> To have the linker works as I expect, I have to enable Direct Linking. Here
> are some links about it:
> http://docs.oracle.com/cd/E19963-01/html/819-0690/aehzq.html
> https://blogs.oracle.com/msw/entry/library_bindings_let_s_be
> https://blogs.oracle.com/rie/entry/direct_binding_now_the_default

Looks good.

> The problem is that the exemples explains how to enable direct linking when
> you compile a binary against a program but it doesn't tell if it's possible
> to compile a library in order to require direct linking when a program
> tries to link with it.

A library is bound by calling:

cc -o libname -dy -G -ztext -h soname -M mapfile *.o -lneeded-libs

I see no problem to add -Bdirect to this commandline.

> I tried to change the mapfile like this (for openssl 0.9.8):
>   OPENSSL_0.9.8 {
>           global:
>                   BIO_f_ssl = DIRECT;
>                   BIO_new_buffer_ssl_connect = DIRECT;
>                   BIO_new_ssl = DIRECT;
>                   BIO_new_ssl_connect = DIRECT;
>    [...]
>
> But it didn't work so far.
> I might require every library / program that link with openssl to enable
> direct linking but that would be more intrusive.

Wouldn't it be sufficient to just make the high level libs and the final binary 
use -Bdirect?

Jörg

-- 
 EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js at cs.tu-berlin.de                (uni)  
       joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily


More information about the maintainers mailing list