dlsym() on implicit loaded symbols
Roland Dittel
Roland.Dittel at web.de
Sun Jul 16 13:26:38 UTC 2006
Am 16.07.2006 um 14:33 schrieb Simon 'corecode' Schubert:
> 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:
That's it. Thank you very much.
Roland
>
> 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 / \
>
More information about the freebsd-hackers
mailing list