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
[-- Attachment #1 --]
Roland Dittel wrote:
>>> We have a issue with dlsym() on symbols imported by a library that
>>> was loaded with dlopen(). Our code loads the libssl with dlopen() and
>>> then do a dlsym() on several symbols. This works for all symbols
>>> exported by libssl itself but fails for symbols exported by
>>> libcrypto.
[..]
> func = 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 handle (see dlopen()). Load ordering is used in dlsym() operations upon the global symbol object. The symbol resolution algorithm used shall be dependency 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
--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
[-- Attachment #2 --]
-----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44BA31FE.7070200>
