Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jul 2006 14:33:02 +0200
From:      Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
To:        Roland Dittel <Roland.Dittel@web.de>
Cc:        hackers@freebsd.org
Subject:   Re: dlsym() on implicit loaded symbols
Message-ID:  <44BA31FE.7070200@fs.ei.tum.de>
In-Reply-To: <44BA1B7B.8000305@web.de>
References:  <62d3f75eb4400604406fdea341d91e41@web.de> <44B92FD7.90801@fs.ei.tum.de> <44BA1B7B.8000305@web.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigA86F4B6AFFC8D6C383C08255
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Roland Dittel wrote:
>>> We have a issue with dlsym() on symbols imported by a library that=20
>>> was loaded with dlopen(). Our code loads the libssl with dlopen() and=
=20
>>> then do a dlsym() on several symbols. This works for all symbols=20
>>> exported by libssl itself but fails for symbols exported by=20
>>> libcrypto.
[..]
>       func =3D dlsym(handle, "CRYPTO_set_id_callback");

you have to use RTLD_DEFAULT instead of handle, but I agree, this is not =
in conformance with SUSv3:

    The dlsym() function shall search for the named symbol in all objects=
 loaded automatically as a result of loading the object referenced by han=
dle (see dlopen()). Load ordering is used in dlsym() operations upon the =
global symbol object. The symbol resolution algorithm used shall be depen=
dency order as described in dlopen().

    The RTLD_DEFAULT and RTLD_NEXT flags are reserved for future use.

Note "in all objects loaded automatically".  Good catch!

cheers
  simon

--=20
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low =E2=82=AC=E2=82=AC=E2=82=AC NOW!1  +++=
      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \


--------------enigA86F4B6AFFC8D6C383C08255
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (DragonFly)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEujICr5S+dk6z85oRArhwAKD2xn+pZ4sAuX1YkdrSFO9YXcnS8wCeMtDj
0RWwEay+/rO+NIo8EQXiux8=
=GCni
-----END PGP SIGNATURE-----

--------------enigA86F4B6AFFC8D6C383C08255--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44BA31FE.7070200>