[Serdev] RTLD_NOW vs. DL_LAZY in sr_module.c
Andrei Pelinescu-Onciul
andrei at iptel.org
Tue Apr 18 13:13:10 UTC 2006
On Apr 16, 2006 at 05:26, Hendrik Scholz <hscholz at raisdorf.net> wrote:
> Hi!
>
> I was looking into bug SER-105 and found this snippet in sr_module.c:
>
> #ifndef RTLD_NOW
> /* for openbsd */
> #define RTLD_NOW DL_LAZY
> #endif
>
> _NOW and _LAZY are somewhat of a contradiction here.
> Are there any reasons for using the lazy mechanism on OpenBSD?
Yes, netbsds and older openbsds (I think older than 3.9) don't support
RTLD_NOW, so for them we use DL_LAZY.
> SER would bail out on load if _NOW was used which seems to
> be the preferred behaviour.
Yes, but if NOW it's not available we have no choice.
> It also might speed up the first call to the function in live
> traffic since all references are resolved upon SER startup ;-)
Andrei
More information about the Serdev
mailing list